| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // associated with it. | 116 // associated with it. |
| 117 | 117 |
| 118 // WARNING: The string names of the permissions passed in below are used to | 118 // WARNING: The string names of the permissions passed in below are used to |
| 119 // generate preference names and should never be changed! | 119 // generate preference names and should never be changed! |
| 120 | 120 |
| 121 Register(CONTENT_SETTINGS_TYPE_COOKIES, "cookies", CONTENT_SETTING_ALLOW, | 121 Register(CONTENT_SETTINGS_TYPE_COOKIES, "cookies", CONTENT_SETTING_ALLOW, |
| 122 WebsiteSettingsInfo::SYNCABLE, | 122 WebsiteSettingsInfo::SYNCABLE, |
| 123 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), | 123 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), |
| 124 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 124 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
| 125 CONTENT_SETTING_SESSION_ONLY), | 125 CONTENT_SETTING_SESSION_ONLY), |
| 126 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, | 126 WebsiteSettingsInfo::REQUESTING_DOMAIN_ONLY_SCOPE, |
| 127 WebsiteSettingsRegistry::ALL_PLATFORMS, | 127 WebsiteSettingsRegistry::ALL_PLATFORMS, |
| 128 ContentSettingsInfo::INHERIT_IN_INCOGNITO); | 128 ContentSettingsInfo::INHERIT_IN_INCOGNITO); |
| 129 | 129 |
| 130 Register(CONTENT_SETTINGS_TYPE_IMAGES, "images", CONTENT_SETTING_ALLOW, | 130 Register(CONTENT_SETTINGS_TYPE_IMAGES, "images", CONTENT_SETTING_ALLOW, |
| 131 WebsiteSettingsInfo::SYNCABLE, | 131 WebsiteSettingsInfo::SYNCABLE, |
| 132 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme, | 132 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme, |
| 133 kExtensionScheme), | 133 kExtensionScheme), |
| 134 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), | 134 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), |
| 135 WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE, | 135 WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE, |
| 136 WebsiteSettingsRegistry::DESKTOP, | 136 WebsiteSettingsRegistry::DESKTOP, |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 if (!website_settings_info) | 357 if (!website_settings_info) |
| 358 return; | 358 return; |
| 359 | 359 |
| 360 DCHECK(!base::ContainsKey(content_settings_info_, type)); | 360 DCHECK(!base::ContainsKey(content_settings_info_, type)); |
| 361 content_settings_info_[type] = base::WrapUnique( | 361 content_settings_info_[type] = base::WrapUnique( |
| 362 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, | 362 new ContentSettingsInfo(website_settings_info, whitelisted_schemes, |
| 363 valid_settings, incognito_behavior)); | 363 valid_settings, incognito_behavior)); |
| 364 } | 364 } |
| 365 | 365 |
| 366 } // namespace content_settings | 366 } // namespace content_settings |
| OLD | NEW |