| 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 264 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 265 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 265 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 266 | 266 |
| 267 Register(CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, "background-sync", | 267 Register(CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, "background-sync", |
| 268 CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::UNSYNCABLE, | 268 CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::UNSYNCABLE, |
| 269 WhitelistedSchemes(), | 269 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 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 272 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 273 | 273 |
| 274 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", |
| 275 CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::UNSYNCABLE, |
| 276 WhitelistedSchemes(), |
| 277 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
| 278 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
| 279 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 280 |
| 274 // Content settings that aren't used to store any data. TODO(raymes): use a | 281 // Content settings that aren't used to store any data. TODO(raymes): use a |
| 275 // different mechanism rather than content settings to represent these. | 282 // different mechanism rather than content settings to represent these. |
| 276 // Since nothing is stored in them, there is no real point in them being a | 283 // Since nothing is stored in them, there is no real point in them being a |
| 277 // content setting. | 284 // content setting. |
| 278 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", | 285 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", |
| 279 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 286 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
| 280 WhitelistedSchemes(), ValidSettings(), | 287 WhitelistedSchemes(), ValidSettings(), |
| 281 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE, | 288 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE, |
| 282 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 289 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 283 | 290 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 type, name, std::move(default_value), sync_status, | 325 type, name, std::move(default_value), sync_status, |
| 319 WebsiteSettingsInfo::NOT_LOSSY, scoping_type, | 326 WebsiteSettingsInfo::NOT_LOSSY, scoping_type, |
| 320 WebsiteSettingsInfo::INHERIT_IN_INCOGNITO); | 327 WebsiteSettingsInfo::INHERIT_IN_INCOGNITO); |
| 321 DCHECK(!ContainsKey(content_settings_info_, type)); | 328 DCHECK(!ContainsKey(content_settings_info_, type)); |
| 322 content_settings_info_[type] = make_scoped_ptr( | 329 content_settings_info_[type] = make_scoped_ptr( |
| 323 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, | 330 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, |
| 324 valid_settings, incognito_behavior)); | 331 valid_settings, incognito_behavior)); |
| 325 } | 332 } |
| 326 | 333 |
| 327 } // namespace content_settings | 334 } // namespace content_settings |
| OLD | NEW |