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

Unified Diff: chrome/browser/profiles/profile_impl.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_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index b8b89a85d9cb035ed3f7e82dbf67250ad421a9f2..6175dcdad26aae1017570c9ef22129dc5bdc054c 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -737,6 +737,9 @@ ProfileImpl::~ProfileImpl() {
if (protocol_handler_registry_)
protocol_handler_registry_->Finalize();
+ if (cookie_content_settings_)
+ cookie_content_settings_->ShutdownOnUIThread();
+
if (host_content_settings_map_)
host_content_settings_map_->ShutdownOnUIThread();
@@ -832,7 +835,7 @@ ExtensionSpecialStoragePolicy*
ProfileImpl::GetExtensionSpecialStoragePolicy() {
if (!extension_special_storage_policy_.get()) {
extension_special_storage_policy_ =
- new ExtensionSpecialStoragePolicy(GetHostContentSettingsMap());
+ new ExtensionSpecialStoragePolicy(GetCookieContentSettings());
}
return extension_special_storage_policy_.get();
}
@@ -1015,9 +1018,20 @@ HostContentSettingsMap* ProfileImpl::GetHostContentSettingsMap() {
host_content_settings_map_ = new HostContentSettingsMap(
GetPrefs(), GetExtensionService(), false);
}
+ // Create CookieContentSettings, too, since it takes care of migrating
markusheintz_ 2011/08/24 12:29:40 Are you sure about this? If you only read cookie s
marja 2011/08/25 13:56:11 There was a unit test depending on this, and only
+ // preferences to HostContentSettingsMap.
+ if (!cookie_content_settings_.get()) {
+ cookie_content_settings_ = new CookieContentSettings(
+ host_content_settings_map_.get(), GetPrefs(), false);
+ }
return host_content_settings_map_.get();
}
+CookieContentSettings* ProfileImpl::GetCookieContentSettings() {
+ GetHostContentSettingsMap();
+ return cookie_content_settings_.get();
+}
+
HostZoomMap* ProfileImpl::GetHostZoomMap() {
if (!host_zoom_map_) {
host_zoom_map_ = new HostZoomMap();

Powered by Google App Engine
This is Rietveld 408576698