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(); |