Chromium Code Reviews| Index: chrome/browser/host_content_settings_map.cc |
| diff --git a/chrome/browser/host_content_settings_map.cc b/chrome/browser/host_content_settings_map.cc |
| index dc6517cf9d39228765fa2922187924b9fb122c9e..6a218b01d64a00c8162f57924701ce46278a1e93 100644 |
| --- a/chrome/browser/host_content_settings_map.cc |
| +++ b/chrome/browser/host_content_settings_map.cc |
| @@ -796,9 +796,13 @@ void HostContentSettingsMap::ResetToDefaults() { |
| AutoLock auto_lock(lock_); |
| default_content_settings_ = ContentSettings(); |
| ForceDefaultsToBeExplicit(); |
| + // Clear all content settings map except the |
| + // managed_default_content_settings. |
| host_content_settings_.clear(); |
| off_the_record_settings_.clear(); |
| - block_third_party_cookies_ = false; |
| + // Don't reset block third party cookies if they are managed. |
| + if (!IsBlockThirdPartyCookiesManaged()) |
| + block_third_party_cookies_ = false; |
| block_nonsandboxed_plugins_ = false; |
| } |
| @@ -807,6 +811,9 @@ void HostContentSettingsMap::ResetToDefaults() { |
| updating_preferences_ = true; |
| prefs->ClearPref(prefs::kDefaultContentSettings); |
| prefs->ClearPref(prefs::kContentSettingsPatterns); |
| + // If the block third party cookies preference is managed we still must |
| + // clear it in order to restore the default value for later when the |
| + // preference is not managaged anymore. |
|
jochen (gone - plz use gerrit)
2010/11/29 13:31:28
managed
markusheintz_
2010/11/29 13:58:02
Done.
|
| prefs->ClearPref(prefs::kBlockThirdPartyCookies); |
| prefs->ClearPref(prefs::kBlockNonsandboxedPlugins); |
| updating_preferences_ = false; |