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

This commit is contained in:
Fabrice Desré 2012-04-30 10:27:57 -07:00
parent 88826442da
commit 17bb6e693e
2 changed files with 6 additions and 1 deletions

View File

@ -186,7 +186,10 @@ IDBFactory::GetDirectory(nsIFile** aDirectory)
{
nsresult rv;
if (XRE_GetProcessType() == GeckoProcessType_Default) {
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, aDirectory);
rv = NS_GetSpecialDirectory(NS_APP_INDEXEDDB_PARENT_DIR, aDirectory);
if (NS_FAILED(rv)) {
rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, aDirectory);
}
NS_ENSURE_SUCCESS(rv, rv);
rv = (*aDirectory)->Append(NS_LITERAL_STRING("indexedDB"));
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -119,4 +119,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