Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: components/content_settings/core/browser/content_settings_registry.cc

Issue 1417173010: Adding <keygen> Content Setting (core) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing ContentSetting Register. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 CONTENT_SETTING_ASK), 227 CONTENT_SETTING_ASK),
228 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE); 228 WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE);
229 #endif 229 #endif
230 230
231 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage", 231 Register(CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, "durable-storage",
232 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, 232 CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE,
233 WhitelistedSchemes(), 233 WhitelistedSchemes(),
234 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK), 234 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK),
235 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE); 235 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE);
236 236
237 Register(CONTENT_SETTINGS_TYPE_KEYGEN, "keygen",
238 CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE,
239 WhitelistedSchemes(),
240 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK),
241 WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE);
242
237 // Content settings that aren't used to store any data. TODO(raymes): use a 243 // Content settings that aren't used to store any data. TODO(raymes): use a
238 // different mechanism rather than content settings to represent these. 244 // different mechanism rather than content settings to represent these.
239 // Since nothing is stored in them, there is no real point in them being a 245 // Since nothing is stored in them, there is no real point in them being a
240 // content setting. 246 // content setting.
241 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler", 247 Register(CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "protocol-handler",
242 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE, 248 CONTENT_SETTING_DEFAULT, WebsiteSettingsInfo::UNSYNCABLE,
243 WhitelistedSchemes(), ValidSettings(), 249 WhitelistedSchemes(), ValidSettings(),
244 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE); 250 WebsiteSettingsInfo::TOP_LEVEL_DOMAIN_ONLY_SCOPE);
245 251
246 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script", 252 Register(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script",
(...skipping 24 matching lines...) Expand all
271 website_settings_registry_->Register( 277 website_settings_registry_->Register(
272 type, name, default_value.Pass(), sync_status, 278 type, name, default_value.Pass(), sync_status,
273 WebsiteSettingsInfo::NOT_LOSSY, scoping_type); 279 WebsiteSettingsInfo::NOT_LOSSY, scoping_type);
274 DCHECK(!ContainsKey(content_settings_info_, type)); 280 DCHECK(!ContainsKey(content_settings_info_, type));
275 content_settings_info_.set( 281 content_settings_info_.set(
276 type, make_scoped_ptr(new ContentSettingsInfo( 282 type, make_scoped_ptr(new ContentSettingsInfo(
277 website_settings_info, whitelisted_schemes, valid_settings))); 283 website_settings_info, whitelisted_schemes, valid_settings)));
278 } 284 }
279 285
280 } // namespace content_settings 286 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698