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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 272 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
273 WhitelistedSchemes(), ValidSettings(), | 273 WhitelistedSchemes(), ValidSettings(), |
274 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE, | 274 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE, |
275 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 275 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
276 | 276 |
277 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", | 277 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", |
278 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 278 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
279 WhitelistedSchemes(), ValidSettings(), | 279 WhitelistedSchemes(), ValidSettings(), |
280 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE, | 280 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE, |
281 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 281 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 282 |
| 283 Register(CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, "bluetooth-guard", |
| 284 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, |
| 285 WhitelistedSchemes(), |
| 286 ValidSettings(CONTENT_SETTING_ASK, CONTENT_SETTING_BLOCK), |
| 287 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE, |
| 288 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
282 } | 289 } |
283 | 290 |
284 void ContentSettingsRegistry::Register( | 291 void ContentSettingsRegistry::Register( |
285 ContentSettingsType type, | 292 ContentSettingsType type, |
286 const std::string& name, | 293 const std::string& name, |
287 ContentSetting initial_default_value, | 294 ContentSetting initial_default_value, |
288 WebsiteSettingsInfo::SyncStatus sync_status, | 295 WebsiteSettingsInfo::SyncStatus sync_status, |
289 const std::vector<std::string>& whitelisted_schemes, | 296 const std::vector<std::string>& whitelisted_schemes, |
290 const std::set<ContentSetting>& valid_settings, | 297 const std::set<ContentSetting>& valid_settings, |
291 WebsiteSettingsInfo::ScopingType scoping_type, | 298 WebsiteSettingsInfo::ScopingType scoping_type, |
(...skipping 12 matching lines...) Expand all Loading... |
304 type, name, std::move(default_value), sync_status, | 311 type, name, std::move(default_value), sync_status, |
305 WebsiteSettingsInfo::NOT_LOSSY, scoping_type, | 312 WebsiteSettingsInfo::NOT_LOSSY, scoping_type, |
306 WebsiteSettingsInfo::INHERIT_IN_INCOGNITO); | 313 WebsiteSettingsInfo::INHERIT_IN_INCOGNITO); |
307 DCHECK(!ContainsKey(content_settings_info_, type)); | 314 DCHECK(!ContainsKey(content_settings_info_, type)); |
308 content_settings_info_[type] = make_scoped_ptr( | 315 content_settings_info_[type] = make_scoped_ptr( |
309 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, | 316 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, |
310 valid_settings, incognito_behavior)); | 317 valid_settings, incognito_behavior)); |
311 } | 318 } |
312 | 319 |
313 } // namespace content_settings | 320 } // namespace content_settings |
OLD | NEW |