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

Unified Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 356543003: Audit the last usage of Geolocation and Notification permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests and a few more methods. Created 6 years, 6 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/notifications/desktop_notification_service.cc
diff --git a/chrome/browser/notifications/desktop_notification_service.cc b/chrome/browser/notifications/desktop_notification_service.cc
index c2b10ad419348f9677a1ba5b7a72b937db7e4ee1..26e0a479a680b6bf439816d50e03e9ed06885cdc 100644
--- a/chrome/browser/notifications/desktop_notification_service.cc
+++ b/chrome/browser/notifications/desktop_notification_service.cc
@@ -512,6 +512,12 @@ void DesktopNotificationService::RequestPermission(
WebContents* web_contents = WebContents::FromRenderFrameHost(
render_frame_host);
ContentSetting setting = GetContentSetting(origin);
+
+ if (setting == CONTENT_SETTING_ALLOW) {
dewittj 2014/06/26 23:17:47 I wonder if this would be better done in ChromeCon
dewittj 2014/06/27 02:52:03 In other words, I'm wary of a special exception ri
Daniel Nishi 2014/06/27 17:25:19 I've moved this into the HostContentSettingsMap to
+ profile_->GetHostContentSettingsMap()->UpdateLastUsage(
+ origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
+ }
+
if (setting == CONTENT_SETTING_ASK) {
if (PermissionBubbleManager::Enabled()) {
PermissionBubbleManager* bubble_manager =

Powered by Google App Engine
This is Rietveld 408576698