| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | 266 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
| 267 | 267 |
| 268 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, | 268 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, |
| 269 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), | 269 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), |
| 270 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), | 270 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
| 271 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 271 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 272 WebsiteSettingsRegistry::DESKTOP | | 272 WebsiteSettingsRegistry::DESKTOP | |
| 273 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 273 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
| 274 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | 274 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
| 275 | 275 |
| 276 Register(CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, "subresource-filter", |
| 277 CONTENT_SETTING_ALLOW, |
| 278 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), |
| 279 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
| 280 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 281 WebsiteSettingsRegistry::DESKTOP | |
| 282 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
| 283 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
| 284 |
| 276 // Content settings that aren't used to store any data. TODO(raymes): use a | 285 // Content settings that aren't used to store any data. TODO(raymes): use a |
| 277 // different mechanism rather than content settings to represent these. | 286 // different mechanism rather than content settings to represent these. |
| 278 // Since nothing is stored in them, there is no real point in them being a | 287 // Since nothing is stored in them, there is no real point in them being a |
| 279 // content setting. | 288 // content setting. |
| 280 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", | 289 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", |
| 281 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 290 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
| 282 WhitelistedSchemes(), ValidSettings(), | 291 WhitelistedSchemes(), ValidSettings(), |
| 283 WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE, | 292 WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE, |
| 284 WebsiteSettingsRegistry::DESKTOP, | 293 WebsiteSettingsRegistry::DESKTOP, |
| 285 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | 294 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if (!website_settings_info) | 335 if (!website_settings_info) |
| 327 return; | 336 return; |
| 328 | 337 |
| 329 DCHECK(!base::ContainsKey(content_settings_info_, type)); | 338 DCHECK(!base::ContainsKey(content_settings_info_, type)); |
| 330 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( | 339 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( |
| 331 website_settings_info, whitelisted_schemes, valid_settings, | 340 website_settings_info, whitelisted_schemes, valid_settings, |
| 332 incognito_behavior); | 341 incognito_behavior); |
| 333 } | 342 } |
| 334 | 343 |
| 335 } // namespace content_settings | 344 } // namespace content_settings |
| OLD | NEW |