mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 303279 - Use "special" localstore when in safe mode, r=mconnor+darin
This commit is contained in:
parent
fc2c9e5234
commit
4e83816dae
@ -60,6 +60,11 @@
|
||||
// this key will not be available.
|
||||
#define NS_APP_PROFILE_DIR_STARTUP "ProfDS"
|
||||
|
||||
// This directory service key is a lot like NS_APP_LOCALSTORE_50_FILE,
|
||||
// but it is always the "main" localstore file, even when we're in safe mode
|
||||
// and we load localstore from somewhere else.
|
||||
#define NS_LOCALSTORE_UNSAFE_FILE "LStoreS"
|
||||
|
||||
class nsACString;
|
||||
struct nsXREAppData;
|
||||
struct nsStaticModuleInfo;
|
||||
|
@ -262,10 +262,20 @@ nsXREDirProvider::GetFile(const char* aProperty, PRBool* aPersistent,
|
||||
rv = mProfileDir->Clone(getter_AddRefs(file));
|
||||
rv |= file->AppendNative(NS_LITERAL_CSTRING("prefs.js"));
|
||||
}
|
||||
else if (!strcmp(aProperty, NS_APP_LOCALSTORE_50_FILE)) {
|
||||
else if (!strcmp(aProperty, NS_LOCALSTORE_UNSAFE_FILE)) {
|
||||
rv = mProfileDir->Clone(getter_AddRefs(file));
|
||||
rv |= file->AppendNative(NS_LITERAL_CSTRING("localstore.rdf"));
|
||||
EnsureProfileFileExists(file);
|
||||
}
|
||||
else if (!strcmp(aProperty, NS_APP_LOCALSTORE_50_FILE)) {
|
||||
rv = mProfileDir->Clone(getter_AddRefs(file));
|
||||
if (gSafeMode) {
|
||||
rv |= file->AppendNative(NS_LITERAL_CSTRING("localstore-safe.rdf"));
|
||||
file->Remove(PR_FALSE);
|
||||
}
|
||||
else {
|
||||
rv |= file->AppendNative(NS_LITERAL_CSTRING("localstore.rdf"));
|
||||
EnsureProfileFileExists(file);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(aProperty, NS_APP_HISTORY_50_FILE)) {
|
||||
rv = mProfileDir->Clone(getter_AddRefs(file));
|
||||
|
Loading…
Reference in New Issue
Block a user