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

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: Add auditing for actual usage, too. 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/geolocation/geolocation_permission_context.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context.cc b/chrome/browser/geolocation/geolocation_permission_context.cc
index dd4f7942bc66685a302393a52cc11f6cde2db071..5e388fa9262bec69499bf11ff956251aae266255 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context.cc
@@ -201,9 +201,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(
Michael van Ouwerkerk 2014/07/01 11:02:23 This doesn't make sense to me. If permission has a
Daniel Nishi 2014/07/01 18:37:48 This location only tracks if permission is asked f
Michael van Ouwerkerk 2014/07/02 18:51:15 Cool, thanks.
+ 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