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

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: Removing test_runner. 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme, 124 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme,
125 kExtensionScheme), 125 kExtensionScheme),
126 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); 126 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK));
127 127
128 Register(CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript", 128 Register(CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript",
129 CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::SYNCABLE, 129 CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::SYNCABLE,
130 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme, 130 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme,
131 kExtensionScheme), 131 kExtensionScheme),
132 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK)); 132 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK));
133 133
134 Register(CONTENT_SETTINGS_TYPE_KEYGEN, "keygen",
135 CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::SYNCABLE,
136 WhitelistedSchemes(),
137 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK));
138
134 Register(CONTENT_SETTINGS_TYPE_PLUGINS, "plugins", 139 Register(CONTENT_SETTINGS_TYPE_PLUGINS, "plugins",
135 CONTENT_SETTING_DETECT_IMPORTANT_CONTENT, 140 CONTENT_SETTING_DETECT_IMPORTANT_CONTENT,
136 WebsiteSettingsInfo::SYNCABLE, 141 WebsiteSettingsInfo::SYNCABLE,
137 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme), 142 WhitelistedSchemes(kChromeUIScheme, kChromeDevToolsScheme),
138 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, 143 ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
139 CONTENT_SETTING_ASK, 144 CONTENT_SETTING_ASK,
140 CONTENT_SETTING_DETECT_IMPORTANT_CONTENT)); 145 CONTENT_SETTING_DETECT_IMPORTANT_CONTENT));
141 146
142 Register(CONTENT_SETTINGS_TYPE_POPUPS, "popups", CONTENT_SETTING_BLOCK, 147 Register(CONTENT_SETTINGS_TYPE_POPUPS, "popups", CONTENT_SETTING_BLOCK,
143 WebsiteSettingsInfo::SYNCABLE, 148 WebsiteSettingsInfo::SYNCABLE,
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698