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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context.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: Jam nits. Created 6 years, 5 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/geolocation/geolocation_permission_context.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc
index 37c53e8e479ae34bffddfc9b468bf2332e8d1b68..1e634bd4be1c69c086bc501749384177c74b32d5 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context.cc
@@ -209,9 +209,12 @@ void GeolocationPermissionContext::DecidePermission(
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
ContentSetting content_setting =
- profile_->GetHostContentSettingsMap()->GetContentSetting(
- requesting_frame, embedder, CONTENT_SETTINGS_TYPE_GEOLOCATION,
- std::string());
+ profile_->GetHostContentSettingsMap()
+ ->GetContentSettingAndMaybeUpdateLastUsage(
+ requesting_frame,
+ embedder,
+ CONTENT_SETTINGS_TYPE_GEOLOCATION,
+ std::string());
switch (content_setting) {
case CONTENT_SETTING_BLOCK:
PermissionDecided(id, requesting_frame, embedder, callback, false);

Powered by Google App Engine
This is Rietveld 408576698