Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2415)

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10447117: Unwire the clear on exit preference from the storage systems. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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(
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.h » ('j') | chrome/browser/net/sqlite_persistent_cookie_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698