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

Unified Diff: chrome/browser/net/chrome_url_request_context.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/net/chrome_url_request_context.cc
diff --git a/chrome/browser/net/chrome_url_request_context.cc b/chrome/browser/net/chrome_url_request_context.cc
index 11a4d9dbaa684789ed1ce4e933775acf7e4678ef..7f8d2ca03b914bf35aa5d421757a7edb40c09a3a 100644
--- a/chrome/browser/net/chrome_url_request_context.cc
+++ b/chrome/browser/net/chrome_url_request_context.cc
@@ -262,15 +262,6 @@ void ChromeURLRequestContextGetter::Observe(
&ChromeURLRequestContextGetter::OnDefaultCharsetChange,
this,
default_charset));
- } else if (*pref_name_in == prefs::kClearSiteDataOnExit) {
- bool clear_site_data =
- prefs->GetBoolean(prefs::kClearSiteDataOnExit);
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(
- &ChromeURLRequestContextGetter::OnClearSiteDataOnExitChange,
- this,
- clear_site_data));
}
} else {
NOTREACHED();
@@ -283,7 +274,6 @@ void ChromeURLRequestContextGetter::RegisterPrefsObserver(Profile* profile) {
registrar_.Init(profile->GetPrefs());
registrar_.Add(prefs::kAcceptLanguages, this);
registrar_.Add(prefs::kDefaultCharset, this);
- registrar_.Add(prefs::kClearSiteDataOnExit, this);
}
void ChromeURLRequestContextGetter::OnAcceptLanguageChange(
@@ -296,19 +286,6 @@ void ChromeURLRequestContextGetter::OnDefaultCharsetChange(
GetIOContext()->OnDefaultCharsetChange(default_charset);
}
-void ChromeURLRequestContextGetter::OnClearSiteDataOnExitChange(
- bool clear_site_data) {
- net::CookieMonster* cookie_monster =
- GetURLRequestContext()->cookie_store()->GetCookieMonster();
-
- // If there is no cookie monster, this function does nothing. If
- // clear_site_data is true, this is most certainly not the expected behavior.
- DCHECK(!clear_site_data || cookie_monster);
-
- if (cookie_monster)
- cookie_monster->SetClearPersistentStoreOnExit(clear_site_data);
-}
-
// ----------------------------------------------------------------------------
// ChromeURLRequestContext
// ----------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698