Bug 742626 - Allow indexedDB parent directory to not be the default profile directory. r=bent

This commit is contained in:
Gregor Wagner 2012-06-21 09:39:12 -07:00
Родитель 06b2de4bd0
Коммит c7221b4636
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -214,8 +214,10 @@ IndexedDatabaseManager::GetOrCreate()
if (sIsMainProcess) {
nsCOMPtr<nsIFile> dbBaseDirectory;
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
getter_AddRefs(dbBaseDirectory));
rv = NS_GetSpecialDirectory(NS_APP_INDEXEDDB_PARENT_DIR, getter_AddRefs(dbBaseDirectory));
if (NS_FAILED(rv)) {
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(dbBaseDirectory));
}
NS_ENSURE_SUCCESS(rv, nsnull);
rv = dbBaseDirectory->Append(NS_LITERAL_STRING("indexedDB"));

Просмотреть файл

@ -86,4 +86,6 @@
#define NS_APP_INSTALL_CLEANUP_DIR "XPIClnupD" //location of xpicleanup.dat xpicleanup.exe
#define NS_APP_STORAGE_50_FILE "UStor" // sqlite database used as mozStorage profile db
#define NS_APP_INDEXEDDB_PARENT_DIR "indexedDBPDir"
#endif