mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 10:43:24 +00:00
Inlined pref accessor/modifiers.
This commit is contained in:
parent
007c8243a7
commit
b9a3a75996
52
network/cache/nu/public/nsCachePref.h
vendored
52
network/cache/nu/public/nsCachePref.h
vendored
@ -29,6 +29,7 @@
|
||||
|
||||
//#include "nsISupports.h"
|
||||
#include "prtypes.h"
|
||||
#include "prlog.h"
|
||||
|
||||
class nsCachePref //: public nsISupports
|
||||
{
|
||||
@ -91,5 +92,56 @@ private:
|
||||
PRUint32 m_BkgSleepTime;
|
||||
};
|
||||
|
||||
inline
|
||||
PRUint32 nsCachePref::DiskCacheSize()
|
||||
{
|
||||
return m_DiskCacheSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void nsCachePref::DiskCacheSize(const PRUint32 i_Size)
|
||||
{
|
||||
m_DiskCacheSize = i_Size;
|
||||
}
|
||||
|
||||
inline
|
||||
PRBool nsCachePref::DiskCacheSSL(void)
|
||||
{
|
||||
return m_bDiskCacheSSL;
|
||||
}
|
||||
|
||||
inline
|
||||
void nsCachePref::DiskCacheSSL(PRBool bSet)
|
||||
{
|
||||
m_bDiskCacheSSL = bSet;
|
||||
}
|
||||
|
||||
inline
|
||||
const char*
|
||||
nsCachePref::DiskCacheFolder(void)
|
||||
{
|
||||
PR_ASSERT(m_DiskCacheFolder);
|
||||
return m_DiskCacheFolder;
|
||||
}
|
||||
|
||||
inline
|
||||
PRUint32 nsCachePref::MemCacheSize()
|
||||
{
|
||||
return m_MemCacheSize;
|
||||
}
|
||||
|
||||
inline
|
||||
void nsCachePref::MemCacheSize(const PRUint32 i_Size)
|
||||
{
|
||||
m_MemCacheSize = i_Size;
|
||||
}
|
||||
|
||||
inline
|
||||
PRBool nsCachePref::RevalidateInBkg(void)
|
||||
{
|
||||
return m_bRevalidateInBkg;
|
||||
}
|
||||
|
||||
|
||||
#endif // nsCachePref_h__
|
||||
|
||||
|
2
network/cache/nu/src/makefile.win
vendored
2
network/cache/nu/src/makefile.win
vendored
@ -33,7 +33,7 @@ LLIBS = \
|
||||
$(DIST)\lib\libplc21.lib \
|
||||
$(DIST)\lib\dbm32.lib \
|
||||
$(DIST)\lib\xpcom32.lib \
|
||||
$(DIST)\lib\libpref.lib \
|
||||
$(DIST)\lib\libpref.lib \
|
||||
$(NULL)
|
||||
|
||||
MISCDEP = $(LLIBS)
|
||||
|
40
network/cache/nu/src/nsCachePref.cpp
vendored
40
network/cache/nu/src/nsCachePref.cpp
vendored
@ -137,57 +137,17 @@ nsCachePref::BkgSleepTime(void)
|
||||
return BKG_THREAD_SLEEP;
|
||||
}
|
||||
|
||||
PRUint32 nsCachePref::DiskCacheSize()
|
||||
{
|
||||
return m_DiskCacheSize;
|
||||
}
|
||||
|
||||
void nsCachePref::DiskCacheSize(const PRUint32 i_Size)
|
||||
{
|
||||
m_DiskCacheSize = i_Size;
|
||||
}
|
||||
|
||||
PRBool nsCachePref::DiskCacheSSL(void)
|
||||
{
|
||||
return m_bDiskCacheSSL;
|
||||
}
|
||||
|
||||
void nsCachePref::DiskCacheSSL(PRBool bSet)
|
||||
{
|
||||
m_bDiskCacheSSL = bSet;
|
||||
}
|
||||
|
||||
const char* nsCachePref::DiskCacheDBFilename(void)
|
||||
{
|
||||
return "fat.db";
|
||||
}
|
||||
|
||||
const char* nsCachePref::DiskCacheFolder(void)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
nsCachePref* nsCachePref::GetInstance()
|
||||
{
|
||||
PR_ASSERT(nsCacheManager::GetInstance()->GetPrefs());
|
||||
return nsCacheManager::GetInstance()->GetPrefs();
|
||||
}
|
||||
|
||||
PRUint32 nsCachePref::MemCacheSize()
|
||||
{
|
||||
return m_MemCacheSize;
|
||||
}
|
||||
|
||||
void nsCachePref::MemCacheSize(const PRUint32 i_Size)
|
||||
{
|
||||
m_MemCacheSize = i_Size;
|
||||
}
|
||||
|
||||
PRBool nsCachePref::RevalidateInBkg(void)
|
||||
{
|
||||
return m_bRevalidateInBkg;
|
||||
}
|
||||
|
||||
/*
|
||||
nsrefcnt nsCachePref::AddRef(void)
|
||||
{
|
||||
|
6
network/cache/nu/src/nsDiskModule.cpp
vendored
6
network/cache/nu/src/nsDiskModule.cpp
vendored
@ -27,8 +27,9 @@
|
||||
#include "prmem.h"
|
||||
#include "plstr.h"
|
||||
#include "prlog.h"
|
||||
#include "prclist.h"
|
||||
#include "prio.h"
|
||||
#include "prclist.h"
|
||||
#include "prio.h"
|
||||
#include "prsystem.h" // Directory Separator
|
||||
|
||||
#include "nsDiskModule.h"
|
||||
#include "nsCacheObject.h"
|
||||
@ -444,6 +445,7 @@ char* FullFilename(const char* i_Filename)
|
||||
return 0;
|
||||
}
|
||||
PL_strcpy(g_FullFilename, nsCachePref::GetInstance()->DiskCacheFolder());
|
||||
PL_strcat(g_FullFilename, (const char*)PR_GetDirectorySepartor()); //spelling check later as nspr fixes it.
|
||||
PL_strcat(g_FullFilename, i_Filename);
|
||||
return g_FullFilename;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user