OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/content_settings_registry.h" | 5 #include "components/content_settings/core/browser/content_settings_registry.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "components/content_settings/core/browser/content_settings_utils.h" | 10 #include "components/content_settings/core/browser/content_settings_utils.h" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 CONTENT_SETTING_ASK), | 206 CONTENT_SETTING_ASK), |
207 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE); | 207 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE); |
208 | 208 |
209 Register(CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex", CONTENT_SETTING_ASK, | 209 Register(CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex", CONTENT_SETTING_ASK, |
210 WebsiteSettingsInfo::SYNCABLE, WhitelistedSchemes(), | 210 WebsiteSettingsInfo::SYNCABLE, WhitelistedSchemes(), |
211 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 211 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
212 CONTENT_SETTING_ASK), | 212 CONTENT_SETTING_ASK), |
213 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE); | 213 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE); |
214 | 214 |
215 Register(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging", | 215 Register(CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging", |
216 CONTENT_SETTING_ASK, WebsiteSettingsInfo::SYNCABLE, | 216 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, |
217 WhitelistedSchemes(), | 217 WhitelistedSchemes(), |
218 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 218 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
219 CONTENT_SETTING_ASK), | 219 CONTENT_SETTING_ASK), |
220 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE); | 220 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE); |
221 | 221 |
222 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 222 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
223 Register(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, | 223 Register(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, |
224 "protected-media-identifier", CONTENT_SETTING_ASK, | 224 "protected-media-identifier", CONTENT_SETTING_ASK, |
225 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), | 225 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), |
226 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 226 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 const WebsiteSettingsInfo* website_settings_info = | 276 const WebsiteSettingsInfo* website_settings_info = |
277 website_settings_registry_->Register( | 277 website_settings_registry_->Register( |
278 type, name, default_value.Pass(), sync_status, | 278 type, name, default_value.Pass(), sync_status, |
279 WebsiteSettingsInfo::NOT_LOSSY, scoping_type); | 279 WebsiteSettingsInfo::NOT_LOSSY, scoping_type); |
280 DCHECK(!ContainsKey(content_settings_info_, type)); | 280 DCHECK(!ContainsKey(content_settings_info_, type)); |
281 content_settings_info_[type] = make_scoped_ptr(new ContentSettingsInfo( | 281 content_settings_info_[type] = make_scoped_ptr(new ContentSettingsInfo( |
282 website_settings_info, whitelisted_schemes, valid_settings)); | 282 website_settings_info, whitelisted_schemes, valid_settings)); |
283 } | 283 } |
284 | 284 |
285 } // namespace content_settings | 285 } // namespace content_settings |
OLD | NEW |