| 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_USB, "usb", CONTENT_SETTING_ALLOW, | 
|  | 221            WebsiteSettingsInfo::UNSYNCABLE, WhitelistedSchemes(), | 
|  | 222            ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); | 
|  | 223 | 
| 220   // Content settings that aren't used to store any data. TODO(raymes): use a | 224   // Content settings that aren't used to store any data. TODO(raymes): use a | 
| 221   // different mechanism rather than content settings to represent these. | 225   // 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 | 226   // Since nothing is stored in them, there is no real point in them being a | 
| 223   // content setting. | 227   // content setting. | 
| 224   Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", | 228   Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", | 
| 225            CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 229            CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 
| 226            WhitelistedSchemes(), ValidSettings()); | 230            WhitelistedSchemes(), ValidSettings()); | 
| 227 | 231 | 
| 228   Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", | 232   Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", | 
| 229            CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 233            CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 250       website_settings_registry_->Register(type, name, default_value.Pass(), | 254       website_settings_registry_->Register(type, name, default_value.Pass(), | 
| 251                                            sync_status, | 255                                            sync_status, | 
| 252                                            WebsiteSettingsInfo::NOT_LOSSY); | 256                                            WebsiteSettingsInfo::NOT_LOSSY); | 
| 253   DCHECK(!ContainsKey(content_settings_info_, type)); | 257   DCHECK(!ContainsKey(content_settings_info_, type)); | 
| 254   content_settings_info_.set( | 258   content_settings_info_.set( | 
| 255       type, make_scoped_ptr(new ContentSettingsInfo( | 259       type, make_scoped_ptr(new ContentSettingsInfo( | 
| 256                 website_settings_info, whitelisted_schemes, valid_settings))); | 260                 website_settings_info, whitelisted_schemes, valid_settings))); | 
| 257 } | 261 } | 
| 258 | 262 | 
| 259 }  // namespace content_settings | 263 }  // namespace content_settings | 
| OLD | NEW | 
|---|