| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/content_settings/host_content_settings_map.h" | 5 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 #endif | 131 #endif |
| 132 | 132 |
| 133 OnContentSettingChanged(ContentSettingsPattern(), | 133 OnContentSettingChanged(ContentSettingsPattern(), |
| 134 ContentSettingsPattern(), | 134 ContentSettingsPattern(), |
| 135 CONTENT_SETTINGS_TYPE_DEFAULT, | 135 CONTENT_SETTINGS_TYPE_DEFAULT, |
| 136 std::string()); | 136 std::string()); |
| 137 } | 137 } |
| 138 #endif | 138 #endif |
| 139 | 139 |
| 140 // static | 140 // static |
| 141 void HostContentSettingsMap::RegisterUserPrefs(PrefRegistrySyncable* registry) { | 141 void HostContentSettingsMap::RegisterUserPrefs( |
| 142 registry->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, | 142 user_prefs::PrefRegistrySyncable* registry) { |
| 143 0, | 143 registry->RegisterIntegerPref( |
| 144 PrefRegistrySyncable::UNSYNCABLE_PREF); | 144 prefs::kContentSettingsWindowLastTabIndex, |
| 145 registry->RegisterIntegerPref(prefs::kContentSettingsDefaultWhitelistVersion, | 145 0, |
| 146 0, | 146 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
| 147 PrefRegistrySyncable::SYNCABLE_PREF); | 147 registry->RegisterIntegerPref( |
| 148 registry->RegisterBooleanPref(prefs::kContentSettingsClearOnExitMigrated, | 148 prefs::kContentSettingsDefaultWhitelistVersion, |
| 149 false, | 149 0, |
| 150 PrefRegistrySyncable::SYNCABLE_PREF); | 150 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 151 registry->RegisterBooleanPref( |
| 152 prefs::kContentSettingsClearOnExitMigrated, |
| 153 false, |
| 154 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 151 | 155 |
| 152 // Register the prefs for the content settings providers. | 156 // Register the prefs for the content settings providers. |
| 153 content_settings::DefaultProvider::RegisterUserPrefs(registry); | 157 content_settings::DefaultProvider::RegisterUserPrefs(registry); |
| 154 content_settings::PrefProvider::RegisterUserPrefs(registry); | 158 content_settings::PrefProvider::RegisterUserPrefs(registry); |
| 155 content_settings::PolicyProvider::RegisterUserPrefs(registry); | 159 content_settings::PolicyProvider::RegisterUserPrefs(registry); |
| 156 } | 160 } |
| 157 | 161 |
| 158 ContentSetting HostContentSettingsMap::GetDefaultContentSettingFromProvider( | 162 ContentSetting HostContentSettingsMap::GetDefaultContentSettingFromProvider( |
| 159 ContentSettingsType content_type, | 163 ContentSettingsType content_type, |
| 160 content_settings::ProviderInterface* provider) const { | 164 content_settings::ProviderInterface* provider) const { |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 HostContentSettingsMap::GetProviderTypeFromSource( | 602 HostContentSettingsMap::GetProviderTypeFromSource( |
| 599 const std::string& source) { | 603 const std::string& source) { |
| 600 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { | 604 for (size_t i = 0; i < arraysize(kProviderNames); ++i) { |
| 601 if (source == kProviderNames[i]) | 605 if (source == kProviderNames[i]) |
| 602 return static_cast<ProviderType>(i); | 606 return static_cast<ProviderType>(i); |
| 603 } | 607 } |
| 604 | 608 |
| 605 NOTREACHED(); | 609 NOTREACHED(); |
| 606 return DEFAULT_PROVIDER; | 610 return DEFAULT_PROVIDER; |
| 607 } | 611 } |
| OLD | NEW |