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 ed973ca45813f97c0536f15abec0cb06c7f94dec..70a56665073a897a141059693632206f02c540ce 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -122,6 +122,7 @@ |
#include "content/public/browser/web_contents.h" |
#include "content/public/common/child_process_host.h" |
#include "content/public/common/content_descriptors.h" |
+#include "content/public/common/show_desktop_notification_params.h" |
#include "content/public/common/url_utils.h" |
#include "content/public/common/web_preferences.h" |
#include "extensions/browser/extension_host.h" |
@@ -2174,6 +2175,9 @@ void ChromeContentBrowserClient::ShowDesktopNotification( |
DesktopNotificationServiceFactory::GetForProfile(profile); |
service->ShowDesktopNotification( |
params, render_frame_host, delegate, cancel_callback); |
+ |
+ profile->GetHostContentSettingsMap()->UpdateLastUsage( |
+ params.origin, params.origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); |
#else |
NOTIMPLEMENTED(); |
#endif |
@@ -2211,6 +2215,21 @@ void ChromeContentBrowserClient::RequestMidiSysExPermission( |
user_gesture, result_callback); |
} |
+void ChromeContentBrowserClient::UseContentSettingPermission( |
+ content::WebContents* web_contents, |
+ const GURL& primary_url, |
+ const GURL& secondary_url, |
+ const std::string& setting_type_name) { |
+ ContentSettingsType setting_type; |
+ bool rv = content_settings::GetTypeFromName(setting_type_name, &setting_type); |
+ DCHECK(rv); |
+ Profile::FromBrowserContext(web_contents->GetBrowserContext()) |
+ ->GetHostContentSettingsMap() |
+ ->UpdateLastUsage(primary_url, |
+ secondary_url, |
+ setting_type); |
+} |
+ |
void ChromeContentBrowserClient::RequestProtectedMediaIdentifierPermission( |
content::WebContents* web_contents, |
const GURL& origin, |