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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1417173010: Adding <keygen> Content Setting (core) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing keygen_rules. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c7b797269e891d6ea894a192b87c5bb43ced6f4c..8c6c38720cdae43581292c7a99adc72408978d41 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1911,6 +1911,17 @@ bool ChromeContentBrowserClient::AllowWebRTCIdentityCache(
}
#endif // defined(ENABLE_WEBRTC)
+bool ChromeContentBrowserClient::AllowKeygen(
+ const GURL& url,
+ content::ResourceContext* context) {
+ HostContentSettingsMap* content_settings =
+ ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap();
+
+ return content_settings->GetContentSetting(
+ url, url, CONTENT_SETTINGS_TYPE_KEYGEN, std::string()) ==
+ CONTENT_SETTING_ALLOW;
+}
+
net::URLRequestContext*
ChromeContentBrowserClient::OverrideRequestContextForURL(
const GURL& url, content::ResourceContext* context) {

Powered by Google App Engine
This is Rietveld 408576698