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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 1417033010: Adding <keygen> Content Setting (Blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keygen_core
Patch Set: Rebase. Created 4 years, 11 months 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/content_settings/tab_specific_content_settings.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 5edd14e06bcfeae630434bd456813b13e19fd08a..1ed08706a301d3cf9d02c1661bf285e637d88c22 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -520,6 +520,16 @@ void TabSpecificContentSettings::OnGeolocationPermissionSet(
content::NotificationService::NoDetails());
}
+void TabSpecificContentSettings::OnDidUseKeygen(const GURL& origin_url) {
+ HostContentSettingsMap* map = HostContentSettingsMapFactory::GetForProfile(
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext()));
+ GURL url = web_contents()->GetLastCommittedURL();
+ if (map->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_KEYGEN,
+ std::string()) != CONTENT_SETTING_ALLOW) {
+ OnContentBlocked(CONTENT_SETTINGS_TYPE_KEYGEN);
+ }
+}
+
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
void TabSpecificContentSettings::OnProtectedMediaIdentifierPermissionSet(
const GURL& requesting_origin,
@@ -748,6 +758,7 @@ bool TabSpecificContentSettings::OnMessageReceived(
IPC_BEGIN_MESSAGE_MAP(TabSpecificContentSettings, message)
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked,
OnContentBlockedWithDetail)
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DidUseKeygen, OnDidUseKeygen)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
« no previous file with comments | « chrome/browser/content_settings/tab_specific_content_settings.h ('k') | chrome/renderer/content_settings_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698