Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index f17ea80b48deb5acc7ee8e382243d53825aef832..8df9c45f7669aecce64ee73d8cbb421a51cefd37 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -930,8 +930,12 @@ bool ChromeContentBrowserClient::AllowSaveLocalState( |
content::ResourceContext* context) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
+ CookieSettings* cookie_settings = io_data->GetCookieSettings(); |
+ ContentSetting setting = cookie_settings->GetDefaultCookieSetting(NULL); |
- return !io_data->clear_local_state_on_exit()->GetValue(); |
+ // TODO(bauerb): Should we also disallow local state if the default is BLOCK? |
+ // Could we even support per-origin settings? |
+ return setting != CONTENT_SETTING_SESSION_ONLY; |
} |
bool ChromeContentBrowserClient::AllowWorkerDatabase( |