Commit 573f25e7 authored by jberlin@webkit.org's avatar jberlin@webkit.org
Browse files

WebKit2: Use the Database directory location specified in NSUserDefaults.

https://bugs.webkit.org/show_bug.cgi?id=54496

Reviewed by Darin Adler.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
Use the same logic as WebKit1's WebDatabaseManager::databasesDirectoryPath.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e2b1968c
2011-02-15 Jessie Berlin <jberlin@apple.com>
Reviewed by Darin Adler.
WebKit2: Use the Database directory location specified in NSUserDefaults.
https://bugs.webkit.org/show_bug.cgi?id=54496
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultDatabaseDirectory):
Use the same logic as WebKit1's WebDatabaseManager::databasesDirectoryPath.
2011-02-15 Simon Fraser <simon.fraser@apple.com>
 
Reviewed by Anders Carlsson, Darin Adler.
......@@ -33,6 +33,7 @@
using namespace WebCore;
NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
namespace WebKit {
......@@ -93,7 +94,10 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para
String WebContext::platformDefaultDatabaseDirectory() const
{
return [@"~/Library/WebKit/Databases" stringByStandardizingPath];
NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebDatabaseDirectoryDefaultsKey];
if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
databasesDirectory = @"~/Library/WebKit/Databases";
return [databasesDirectory stringByStandardizingPath];
}
} // namespace WebKit
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment