Permalink
Browse files

TI-186: set database storage location when setting web view prefs

  • Loading branch information...
1 parent f3f92eb commit d7ba6503790c48efab8bdd2878fdc0cd62ea1d2b @jservin jservin committed Apr 14, 2009
@@ -360,7 +360,12 @@ void WebKitSetWebDatabasesPathIfNecessary()
return;
WebCore::String databasesDirectory = WebCore::pathByAppendingComponent(WebCore::localUserSpecificStorageDirectory(), "Databases");
- WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(databasesDirectory);
+ WebKitSetWebDatabasesPath(databasesDirectory);
pathSet = true;
}
+
+void WebKitSetWebDatabasesPath(WebCore::String& databasesDirectory)
+{
+ WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(databasesDirectory);
+}
@@ -83,5 +83,6 @@ class WebDatabaseManager : public IWebDatabaseManager, private WebCore::Database
};
void WebKitSetWebDatabasesPathIfNecessary();
+void WebKitSetWebDatabasesPath(WebCore::String& databasesDirectory);
#endif
View
@@ -2748,6 +2748,17 @@ HRESULT STDMETHODCALLTYPE WebView::setPreferences(
m_preferences = webPrefs;
+ // reset DB local storage path
+ BSTR localStoragePath;
+ if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) {
+ m_page->settings()->setLocalStorageDatabasePath(String(localStoragePath, SysStringLen(localStoragePath)));
+
+ WebCore::String databasesDirectory = String(localStoragePath, SysStringLen(localStoragePath));
+ WebKitSetWebDatabasesPath(databasesDirectory);
+
+ SysFreeString(localStoragePath);
+ }
+
if (identifier) {
WebPreferences::removeReferenceForIdentifier(identifier);
SysFreeString(identifier);
@@ -1 +1 @@
-528
+530
@@ -64,6 +64,7 @@ fi
cat > "$VERSIONFILE" <<EOF
#define __VERSION_TEXT__ "$PRODUCTVERSION ($BLDNMBR)"
+#define __BUILD_NUMBER__ "$BLDNMBR"
#define __BUILD_NUMBER_SHORT__ "$BLDNMBRSHORT"
#define __VERSION_MAJOR__ $MAJORVERSION
#define __VERSION_MINOR__ $MINORVERSION
View
@@ -1,3 +1,3 @@
-cp WebKitBuild/bin/WebKit.dll ../titanium/kroll/thirdparty/win32/webkit/bin/WebKit.dll
-cp WebKitBuild/lib/WebKit.lib ../titanium/kroll/thirdparty/win32/webkit/lib/WebKit.lib
+cp ../../source/WebKitBuild/bin/WebKit.dll ../titanium/kroll/thirdparty/win32/webkit/bin/WebKit.dll
+cp ../../source/WebKitBuild/lib/WebKit.lib ../titanium/kroll/thirdparty/win32/webkit/lib/WebKit.lib

0 comments on commit d7ba650

Please sign in to comment.