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 "components/content_settings/core/browser/host_content_settings_map.h" | 5 #include "components/content_settings/core/browser/host_content_settings_map.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
164 // wouldn't be needed except that we used to allow settings to be stored for | 164 // wouldn't be needed except that we used to allow settings to be stored for |
165 // the guest profile and so we need to ensure those get cleared. | 165 // the guest profile and so we need to ensure those get cleared. |
166 if (is_guest_profile) | 166 if (is_guest_profile) |
167 pref_provider_->ClearPrefs(); | 167 pref_provider_->ClearPrefs(); |
168 | 168 |
169 content_settings::ObservableProvider* default_provider = | 169 content_settings::ObservableProvider* default_provider = |
170 new content_settings::DefaultProvider(prefs_, is_off_the_record_); | 170 new content_settings::DefaultProvider(prefs_, is_off_the_record_); |
171 default_provider->AddObserver(this); | 171 default_provider->AddObserver(this); |
172 content_settings_providers_[DEFAULT_PROVIDER] = default_provider; | 172 content_settings_providers_[DEFAULT_PROVIDER] = default_provider; |
173 | 173 |
174 // ios doesn't have KEYGEN to be migrated. | |
175 #if !defined(OS_IOS) | |
msramek
2016/05/23 14:49:49
To make sure this stays in sync, could we just che
lshang
2016/05/24 11:55:46
Done.
| |
174 MigrateOldSettings(); | 176 MigrateOldSettings(); |
175 | 177 #endif |
176 RecordNumberOfExceptions(); | 178 RecordNumberOfExceptions(); |
177 } | 179 } |
178 | 180 |
179 // static | 181 // static |
180 void HostContentSettingsMap::RegisterProfilePrefs( | 182 void HostContentSettingsMap::RegisterProfilePrefs( |
181 user_prefs::PrefRegistrySyncable* registry) { | 183 user_prefs::PrefRegistrySyncable* registry) { |
182 // Ensure the content settings are all registered. | 184 // Ensure the content settings are all registered. |
183 content_settings::ContentSettingsRegistry::GetInstance(); | 185 content_settings::ContentSettingsRegistry::GetInstance(); |
184 | 186 |
185 registry->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, 0); | 187 registry->RegisterIntegerPref(prefs::kContentSettingsWindowLastTabIndex, 0); |
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
862 rule.secondary_pattern.Matches(secondary_url)) { | 864 rule.secondary_pattern.Matches(secondary_url)) { |
863 if (primary_pattern) | 865 if (primary_pattern) |
864 *primary_pattern = rule.primary_pattern; | 866 *primary_pattern = rule.primary_pattern; |
865 if (secondary_pattern) | 867 if (secondary_pattern) |
866 *secondary_pattern = rule.secondary_pattern; | 868 *secondary_pattern = rule.secondary_pattern; |
867 return base::WrapUnique(rule.value.get()->DeepCopy()); | 869 return base::WrapUnique(rule.value.get()->DeepCopy()); |
868 } | 870 } |
869 } | 871 } |
870 return std::unique_ptr<base::Value>(); | 872 return std::unique_ptr<base::Value>(); |
871 } | 873 } |
OLD | NEW |