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

Unified Diff: chrome/browser/profiles/profile.cc

Issue 7713034: HostContentSettingsMap refactoring. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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/profiles/profile.cc
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc
index 5a0319289516b41717b78f0452943367f70b7d6e..288485391151d2e62b54a19eda397eb1b4dd1170 100644
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -544,6 +544,17 @@ class OffTheRecordProfileImpl : public Profile,
return host_content_settings_map_.get();
}
+ virtual CookieContentSettings* GetCookieContentSettings() {
+ // Retrieve the host content settings map of the parent profile in order to
+ // ensure the preferences have been migrated.
+ profile_->GetHostContentSettingsMap();
+ if (!cookie_content_settings_.get()) {
+ cookie_content_settings_ = new CookieContentSettings(
+ GetHostContentSettingsMap(), GetPrefs(), true);
+ }
+ return cookie_content_settings_.get();
+ }
+
virtual HostZoomMap* GetHostZoomMap() {
if (!host_zoom_map_)
host_zoom_map_ = new HostZoomMap();
@@ -799,6 +810,8 @@ class OffTheRecordProfileImpl : public Profile,
// We use a non-persistent content settings map for OTR.
scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
+ scoped_refptr<CookieContentSettings> cookie_content_settings_;
+
// Use a separate zoom map for OTR.
scoped_refptr<HostZoomMap> host_zoom_map_;

Powered by Google App Engine
This is Rietveld 408576698