| 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 "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "components/content_settings/core/browser/content_settings_utils.h" | 10 #include "components/content_settings/core/browser/content_settings_utils.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), | 210 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), |
| 211 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 211 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
| 212 CONTENT_SETTING_ASK)); | 212 CONTENT_SETTING_ASK)); |
| 213 #endif | 213 #endif |
| 214 | 214 |
| 215 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage", | 215 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage", |
| 216 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, | 216 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, |
| 217 WhitelistedSchemes(), | 217 WhitelistedSchemes(), |
| 218 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); | 218 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); |
| 219 | 219 |
| 220 Register(CONTENT_SETTINGS_TYPE_KEYGEN, "keygen", |
| 221 CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE, |
| 222 WhitelistedSchemes(), |
| 223 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); |
| 224 |
| 220 // Content settings that aren't used to store any data. TODO(raymes): use a | 225 // Content settings that aren't used to store any data. TODO(raymes): use a |
| 221 // different mechanism rather than content settings to represent these. | 226 // different mechanism rather than content settings to represent these. |
| 222 // Since nothing is stored in them, there is no real point in them being a | 227 // Since nothing is stored in them, there is no real point in them being a |
| 223 // content setting. | 228 // content setting. |
| 224 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", | 229 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", |
| 225 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 230 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
| 226 WhitelistedSchemes(), ValidSettings()); | 231 WhitelistedSchemes(), ValidSettings()); |
| 227 | 232 |
| 228 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", | 233 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", |
| 229 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 234 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 250 website_settings_registry_->Register(type, name, default_value.Pass(), | 255 website_settings_registry_->Register(type, name, default_value.Pass(), |
| 251 sync_status, | 256 sync_status, |
| 252 WebsiteSettingsInfo::NOT_LOSSY); | 257 WebsiteSettingsInfo::NOT_LOSSY); |
| 253 DCHECK(!ContainsKey(content_settings_info_, type)); | 258 DCHECK(!ContainsKey(content_settings_info_, type)); |
| 254 content_settings_info_.set( | 259 content_settings_info_.set( |
| 255 type, make_scoped_ptr(new ContentSettingsInfo( | 260 type, make_scoped_ptr(new ContentSettingsInfo( |
| 256 website_settings_info, whitelisted_schemes, valid_settings))); | 261 website_settings_info, whitelisted_schemes, valid_settings))); |
| 257 } | 262 } |
| 258 | 263 |
| 259 } // namespace content_settings | 264 } // namespace content_settings |
| OLD | NEW |