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

Unified Diff: chrome/browser/tab_contents/tab_specific_content_settings.cc

Issue 3194005: Clear cookie related settings at the beginning of a navigation instead of at the end. (Closed)
Patch Set: Created 10 years, 4 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/tab_contents/tab_specific_content_settings.cc
diff --git a/chrome/browser/tab_contents/tab_specific_content_settings.cc b/chrome/browser/tab_contents/tab_specific_content_settings.cc
index 14a921e1adcb5d9d967527c945449189735f7a6b..c1e00de62debaa1974eb67add6430ecee6c9ca8b 100644
--- a/chrome/browser/tab_contents/tab_specific_content_settings.cc
+++ b/chrome/browser/tab_contents/tab_specific_content_settings.cc
@@ -144,18 +144,28 @@ TabSpecificContentSettings::TabSpecificContentSettings(
geolocation_settings_state_(profile),
load_plugins_link_enabled_(true),
delegate_(NULL) {
- ClearBlockedContentSettings();
+ ClearBlockedContentSettingsExceptForCookies();
+ ClearCookieSpecificContentSettings();
delegate_ = delegate;
}
-void TabSpecificContentSettings::ClearBlockedContentSettings() {
+void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() {
for (size_t i = 0; i < arraysize(content_blocked_); ++i) {
+ if (i == CONTENT_SETTINGS_TYPE_COOKIES)
+ continue;
content_blocked_[i] = false;
content_accessed_[i] = false;
}
load_plugins_link_enabled_ = true;
+ if (delegate_)
+ delegate_->OnContentSettingsAccessed(false);
+}
+
+void TabSpecificContentSettings::ClearCookieSpecificContentSettings() {
blocked_local_shared_objects_.Reset();
allowed_local_shared_objects_.Reset();
+ content_blocked_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
+ content_accessed_[CONTENT_SETTINGS_TYPE_COOKIES] = false;
if (delegate_)
delegate_->OnContentSettingsAccessed(false);
}

Powered by Google App Engine
This is Rietveld 408576698