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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage", | 250 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage", |
251 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, | 251 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, |
252 WhitelistedSchemes(), | 252 WhitelistedSchemes(), |
253 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), | 253 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
254 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 254 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
255 WebsiteSettingsRegistry::DESKTOP | | 255 WebsiteSettingsRegistry::DESKTOP | |
256 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 256 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
257 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | 257 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
258 | 258 |
259 Register(CONTENT_SETTINGS_TYPE_KEYGEN, "keygen", CONTENT_SETTING_BLOCK, | |
260 WebsiteSettingsInfo::SYNCABLE, WhitelistedSchemes(), | |
261 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), | |
262 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | |
263 WebsiteSettingsRegistry::DESKTOP | | |
264 WebsiteSettingsRegistry::PLATFORM_ANDROID, | |
265 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | |
266 | |
267 Register(CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, "background-sync", | 259 Register(CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, "background-sync", |
268 CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::UNSYNCABLE, | 260 CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::UNSYNCABLE, |
269 WhitelistedSchemes(), | 261 WhitelistedSchemes(), |
270 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), | 262 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
271 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 263 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, |
272 WebsiteSettingsRegistry::DESKTOP | | 264 WebsiteSettingsRegistry::DESKTOP | |
273 WebsiteSettingsRegistry::PLATFORM_ANDROID, | 265 WebsiteSettingsRegistry::PLATFORM_ANDROID, |
274 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); | 266 ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE); |
275 | 267 |
276 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, | 268 Register(CONTENT_SETTINGS_TYPE_AUTOPLAY, "autoplay", CONTENT_SETTING_ALLOW, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 if (!website_settings_info) | 326 if (!website_settings_info) |
335 return; | 327 return; |
336 | 328 |
337 DCHECK(!base::ContainsKey(content_settings_info_, type)); | 329 DCHECK(!base::ContainsKey(content_settings_info_, type)); |
338 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( | 330 content_settings_info_[type] = base::MakeUnique<ContentSettingsInfo>( |
339 website_settings_info, whitelisted_schemes, valid_settings, | 331 website_settings_info, whitelisted_schemes, valid_settings, |
340 incognito_behavior); | 332 incognito_behavior); |
341 } | 333 } |
342 | 334 |
343 } // namespace content_settings | 335 } // namespace content_settings |
OLD | NEW |