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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), | 221 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), |
222 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, | 222 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, |
223 CONTENT_SETTING_ASK)); | 223 CONTENT_SETTING_ASK)); |
224 #endif | 224 #endif |
225 | 225 |
226 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage", | 226 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage", |
227 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, | 227 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, |
228 WhitelistedSchemes(), | 228 WhitelistedSchemes(), |
229 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); | 229 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); |
230 | 230 |
| 231 Register(CONTENT_SETTINGS_TYPE_USB, "usb", CONTENT_SETTING_ALLOW, |
| 232 WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), |
| 233 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); |
| 234 |
231 // Content settings that aren't used to store any data. TODO(raymes): use a | 235 // Content settings that aren't used to store any data. TODO(raymes): use a |
232 // different mechanism rather than content settings to represent these. | 236 // different mechanism rather than content settings to represent these. |
233 // Since nothing is stored in them, there is no real point in them being a | 237 // Since nothing is stored in them, there is no real point in them being a |
234 // content setting. | 238 // content setting. |
235 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", | 239 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", |
236 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 240 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
237 WhitelistedSchemes(), ValidSettings()); | 241 WhitelistedSchemes(), ValidSettings()); |
238 | 242 |
239 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", | 243 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", |
240 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 244 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, |
(...skipping 20 matching lines...) Expand all Loading... |
261 website_settings_registry_->Register(type, name, default_value.Pass(), | 265 website_settings_registry_->Register(type, name, default_value.Pass(), |
262 sync_status, | 266 sync_status, |
263 WebsiteSettingsInfo::NOT_LOSSY); | 267 WebsiteSettingsInfo::NOT_LOSSY); |
264 DCHECK(!ContainsKey(content_settings_info_, type)); | 268 DCHECK(!ContainsKey(content_settings_info_, type)); |
265 content_settings_info_.set( | 269 content_settings_info_.set( |
266 type, make_scoped_ptr(new ContentSettingsInfo( | 270 type, make_scoped_ptr(new ContentSettingsInfo( |
267 website_settings_info, whitelisted_schemes, valid_settings))); | 271 website_settings_info, whitelisted_schemes, valid_settings))); |
268 } | 272 } |
269 | 273 |
270 } // namespace content_settings | 274 } // namespace content_settings |
OLD | NEW |