Chromium Code Reviews| 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..153673c8e66ad7ae629d06acf8ef46d1587ee1a1 100644 |
| --- a/chrome/browser/notifications/desktop_notification_service.cc |
| +++ b/chrome/browser/notifications/desktop_notification_service.cc |
| @@ -433,6 +433,8 @@ DesktopNotificationService::~DesktopNotificationService() { |
| void DesktopNotificationService::GrantPermission(const GURL& origin) { |
| ContentSettingsPattern primary_pattern = |
| ContentSettingsPattern::FromURLNoWildcard(origin); |
| + profile_->GetHostContentSettingsMap()->UpdateLastUsage( |
|
dewittj
2014/06/26 15:56:51
Why isn't this just done inside SetContentSetting?
Daniel Nishi
2014/06/26 20:31:25
Good point. I've moved this part into SetContentSe
|
| + origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); |
| profile_->GetHostContentSettingsMap()->SetContentSetting( |
| primary_pattern, |
| ContentSettingsPattern::Wildcard(), |
| @@ -512,6 +514,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 15:56:51
why only content setting allow? This is probably
Daniel Nishi
2014/06/26 20:31:25
It's on allow because we're trying to track when t
|
| + profile_->GetHostContentSettingsMap()->UpdateLastUsage( |
| + origin, origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS); |
| + } |
| + |
| if (setting == CONTENT_SETTING_ASK) { |
| if (PermissionBubbleManager::Enabled()) { |
| PermissionBubbleManager* bubble_manager = |