Chromium Code Reviews| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 | 268 |
| 269 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, | 269 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, |
| 270 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), | 270 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), |
| 271 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), | 271 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
| 272 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 272 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 273 WebsiteSettingsRegistry::DESKTOP | | 273 WebsiteSettingsRegistry::DESKTOP | |
| 274 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 274 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
| 275 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | 275 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
| 276 | 276 |
| 277 Register(CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, "subresource-filter", | 277 Register(CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, "subresource-filter", |
| 278 CONTENT_SETTING_ALLOW, | 278 CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::UNSYNCABLE, |
|
engedy
2017/05/11 10:39:37
Changing the default value for a content setting i
Charlie Harrison
2017/05/11 14:05:44
AFAICT this is safe since default values are not p
msramek
2017/05/11 14:29:20
The default provider currently doesn't distinguish
Charlie Harrison
2017/05/11 15:50:11
Thanks for the clarification. As discussed offline
| |
| 279 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), | 279 WhitelistedSchemes(), |
| 280 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), | 280 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
| 281 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 281 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 282 WebsiteSettingsRegistry::DESKTOP | | 282 WebsiteSettingsRegistry::DESKTOP | |
| 283 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 283 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
| 284 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | 284 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
| 285 | 285 |
| 286 // Content settings that aren't used to store any data. TODO(raymes): use a | 286 // Content settings that aren't used to store any data. TODO(raymes): use a |
| 287 // different mechanism rather than content settings to represent these. | 287 // different mechanism rather than content settings to represent these. |
| 288 // Since nothing is stored in them, there is no real point in them being a | 288 // Since nothing is stored in them, there is no real point in them being a |
| 289 // content setting. | 289 // content setting. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 if (!website_settings_info) | 336 if (!website_settings_info) |
| 337 return; | 337 return; |
| 338 | 338 |
| 339 DCHECK(!base::ContainsKey(content_settings_info_, type)); | 339 DCHECK(!base::ContainsKey(content_settings_info_, type)); |
| 340 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( | 340 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( |
| 341 website_settings_info, whitelisted_schemes, valid_settings, | 341 website_settings_info, whitelisted_schemes, valid_settings, |
| 342 incognito_behavior); | 342 incognito_behavior); |
| 343 } | 343 } |
| 344 | 344 |
| 345 } // namespace content_settings | 345 } // namespace content_settings |
| OLD | NEW |