OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 new content_settings::DefaultProvider(prefs_, is_off_the_record_); | 107 new content_settings::DefaultProvider(prefs_, is_off_the_record_); |
108 default_provider->AddObserver(this); | 108 default_provider->AddObserver(this); |
109 content_settings_providers_[DEFAULT_PROVIDER] = default_provider; | 109 content_settings_providers_[DEFAULT_PROVIDER] = default_provider; |
110 } | 110 } |
111 | 111 |
112 // static | 112 // static |
113 void HostContentSettingsMap::RegisterUserPrefs(PrefService* prefs) { | 113 void HostContentSettingsMap::RegisterUserPrefs(PrefService* prefs) { |
114 prefs->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, | 114 prefs->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, |
115 0, | 115 0, |
116 PrefService::UNSYNCABLE_PREF); | 116 PrefService::UNSYNCABLE_PREF); |
| 117 prefs->RegisterIntegerPref(prefs::kContentSettingsDefaultWhitelistVersion, |
| 118 0, PrefService::SYNCABLE_PREF); |
117 | 119 |
118 // Register the prefs for the content settings providers. | 120 // Register the prefs for the content settings providers. |
119 content_settings::DefaultProvider::RegisterUserPrefs(prefs); | 121 content_settings::DefaultProvider::RegisterUserPrefs(prefs); |
120 content_settings::PrefProvider::RegisterUserPrefs(prefs); | 122 content_settings::PrefProvider::RegisterUserPrefs(prefs); |
121 content_settings::PolicyProvider::RegisterUserPrefs(prefs); | 123 content_settings::PolicyProvider::RegisterUserPrefs(prefs); |
122 } | 124 } |
123 | 125 |
124 ContentSetting HostContentSettingsMap::GetDefaultContentSettingFromProvider( | 126 ContentSetting HostContentSettingsMap::GetDefaultContentSettingFromProvider( |
125 ContentSettingsType content_type, | 127 ContentSettingsType content_type, |
126 content_settings::ProviderInterface* provider) const { | 128 content_settings::ProviderInterface* provider) const { |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 } | 455 } |
454 } | 456 } |
455 | 457 |
456 if (info) { | 458 if (info) { |
457 info->source = content_settings::SETTING_SOURCE_NONE; | 459 info->source = content_settings::SETTING_SOURCE_NONE; |
458 info->primary_pattern = ContentSettingsPattern(); | 460 info->primary_pattern = ContentSettingsPattern(); |
459 info->secondary_pattern = ContentSettingsPattern(); | 461 info->secondary_pattern = ContentSettingsPattern(); |
460 } | 462 } |
461 return NULL; | 463 return NULL; |
462 } | 464 } |
OLD | NEW |