diff options
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_delegate_helper.cc | 2 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 2 | ||||
-rw-r--r-- | chrome/renderer/render_thread.cc | 5 | ||||
-rw-r--r-- | webkit/api/public/WebKit.h | 4 | ||||
-rw-r--r-- | webkit/api/public/WebSettings.h | 1 | ||||
-rw-r--r-- | webkit/api/src/WebKit.cpp | 15 | ||||
-rw-r--r-- | webkit/api/src/WebSettingsImpl.cpp | 5 | ||||
-rw-r--r-- | webkit/api/src/WebSettingsImpl.h | 1 | ||||
-rw-r--r-- | webkit/glue/webpreferences.cc | 1 | ||||
-rw-r--r-- | webkit/glue/webpreferences.h | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell.cc | 1 |
12 files changed, 15 insertions, 26 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index 0c2a7b0..7831ab5 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -523,8 +523,6 @@ void BrowserRenderProcessHost::PropogateBrowserCommandLineToRenderer( switches::kEnableDatabases, switches::kDisableByteRangeSupport, switches::kEnableWebSockets, - switches::kEnableLocalStorage, - switches::kEnableSessionStorage, }; for (size_t i = 0; i < arraysize(switch_names); ++i) { diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index b46e392..a0b0c41 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -183,6 +183,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( command_line.HasSwitch(switches::kEnableLocalStorage); web_prefs.databases_enabled = command_line.HasSwitch(switches::kEnableDatabases); + web_prefs.session_storage_enabled = + command_line.HasSwitch(switches::kEnableSessionStorage); web_prefs.experimental_webgl_enabled = command_line.HasSwitch(switches::kEnableExperimentalWebGL); web_prefs.experimental_notifications_enabled = diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index be090f3..0ef796c 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1518,6 +1518,7 @@ struct ParamTraits<WebPreferences> { WriteParam(m, p.xss_auditor_enabled); WriteParam(m, p.local_storage_enabled); WriteParam(m, p.databases_enabled); + WriteParam(m, p.session_storage_enabled); WriteParam(m, p.application_cache_enabled); WriteParam(m, p.tabs_to_links); WriteParam(m, p.user_style_sheet_enabled); @@ -1557,6 +1558,7 @@ struct ParamTraits<WebPreferences> { ReadParam(m, iter, &p->xss_auditor_enabled) && ReadParam(m, iter, &p->local_storage_enabled) && ReadParam(m, iter, &p->databases_enabled) && + ReadParam(m, iter, &p->session_storage_enabled) && ReadParam(m, iter, &p->application_cache_enabled) && ReadParam(m, iter, &p->tabs_to_links) && ReadParam(m, iter, &p->user_style_sheet_enabled) && diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index f1a528c..3ccdd85 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -500,11 +500,6 @@ void RenderThread::EnsureWebKitInitialized() { if (command_line.HasSwitch(switches::kEnableWebSockets)) WebKit::enableWebSockets(); - - WebKit::setLocalStorageEnabled( - command_line.HasSwitch(switches::kEnableLocalStorage)); - WebKit::setSessionStorageEnabled( - command_line.HasSwitch(switches::kEnableSessionStorage)); } void RenderThread::IdleHandler() { diff --git a/webkit/api/public/WebKit.h b/webkit/api/public/WebKit.h index 445e2a5..cf2cea1 100644 --- a/webkit/api/public/WebKit.h +++ b/webkit/api/public/WebKit.h @@ -87,10 +87,6 @@ namespace WebKit { WEBKIT_API void enableWebSockets(); WEBKIT_API bool webSocketsEnabled(); - // Enables HTML5 DOM Storage support. - WEBKIT_API void setLocalStorageEnabled(bool enabled); - WEBKIT_API void setSessionStorageEnabled(bool enabled); - } // namespace WebKit #endif diff --git a/webkit/api/public/WebSettings.h b/webkit/api/public/WebSettings.h index ecbeda6..ab6dbd2 100644 --- a/webkit/api/public/WebSettings.h +++ b/webkit/api/public/WebSettings.h @@ -71,6 +71,7 @@ namespace WebKit { virtual void setDownloadableBinaryFontsEnabled(bool) = 0; virtual void setXSSAuditorEnabled(bool) = 0; virtual void setLocalStorageEnabled(bool) = 0; + virtual void setSessionStorageEnabled(bool) = 0; virtual void setEditableLinkBehaviorNeverLive() = 0; virtual void setFontRenderingModeNormal() = 0; virtual void setShouldPaintCustomScrollbars(bool) = 0; diff --git a/webkit/api/src/WebKit.cpp b/webkit/api/src/WebKit.cpp index 915031c..c0ea7a3 100644 --- a/webkit/api/src/WebKit.cpp +++ b/webkit/api/src/WebKit.cpp @@ -39,7 +39,6 @@ #include "FrameLoader.h" #include "Page.h" #include "SecurityOrigin.h" -#include "Storage.h" #include "TextEncoding.h" #include "WebSocket.h" #include "WorkerContextExecutionProxy.h" @@ -163,18 +162,4 @@ bool webSocketsEnabled() #endif } -void setLocalStorageEnabled(bool enabled) -{ -#if ENABLE(DOM_STORAGE) - WebCore::Storage::setLocalStorageAvailable(enabled); -#endif -} - -void setSessionStorageEnabled(bool enabled) -{ -#if ENABLE(DOM_STORAGE) - WebCore::Storage::setSessionStorageAvailable(enabled); -#endif -} - } // namespace WebKit diff --git a/webkit/api/src/WebSettingsImpl.cpp b/webkit/api/src/WebSettingsImpl.cpp index a193871d..c74c16f 100644 --- a/webkit/api/src/WebSettingsImpl.cpp +++ b/webkit/api/src/WebSettingsImpl.cpp @@ -195,6 +195,11 @@ void WebSettingsImpl::setLocalStorageEnabled(bool enabled) m_settings->setLocalStorageEnabled(enabled); } +void WebSettingsImpl::setSessionStorageEnabled(bool enabled) +{ + m_settings->setSessionStorageEnabled(enabled); +} + void WebSettingsImpl::setEditableLinkBehaviorNeverLive() { // FIXME: If you ever need more behaviors than this, then we should probably diff --git a/webkit/api/src/WebSettingsImpl.h b/webkit/api/src/WebSettingsImpl.h index 0fd6c3f..cd56497 100644 --- a/webkit/api/src/WebSettingsImpl.h +++ b/webkit/api/src/WebSettingsImpl.h @@ -73,6 +73,7 @@ namespace WebKit { virtual void setDownloadableBinaryFontsEnabled(bool); virtual void setXSSAuditorEnabled(bool); virtual void setLocalStorageEnabled(bool); + virtual void setSessionStorageEnabled(bool); virtual void setEditableLinkBehaviorNeverLive(); virtual void setFontRenderingModeNormal(); virtual void setShouldPaintCustomScrollbars(bool); diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc index a2a2b71..cdb7260 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -51,6 +51,7 @@ void WebPreferences::Apply(WebView* web_view) const { settings->setXSSAuditorEnabled(xss_auditor_enabled); settings->setLocalStorageEnabled(local_storage_enabled); settings->setDatabasesEnabled(WebKit::databasesEnabled() || databases_enabled); + settings->setSessionStorageEnabled(session_storage_enabled); settings->setOfflineWebApplicationCacheEnabled(application_cache_enabled); settings->setExperimentalNotificationsEnabled( experimental_notifications_enabled); diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index 13a8c7b3..0693fb9 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -48,6 +48,7 @@ struct WebPreferences { bool xss_auditor_enabled; bool local_storage_enabled; bool databases_enabled; + bool session_storage_enabled; bool application_cache_enabled; bool tabs_to_links; @@ -93,6 +94,7 @@ struct WebPreferences { xss_auditor_enabled(false), local_storage_enabled(false), databases_enabled(false), + session_storage_enabled(false), application_cache_enabled(false), tabs_to_links(true), user_style_sheet_enabled(false), diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 4fb5e82..5c28287 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -425,6 +425,7 @@ void TestShell::ResetWebPreferences() { // lose the coverage of dynamic font tests in webkit test. web_prefs_->remote_fonts_enabled = true; web_prefs_->local_storage_enabled = true; + web_prefs_->session_storage_enabled = true; web_prefs_->application_cache_enabled = true; web_prefs_->databases_enabled = true; // LayoutTests were written with Safari Mac in mind which does not allow |