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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context_android.h

Issue 2791193002: Log metrics for the Location Settings Dialog prompt for geolocation. (Closed)
Patch Set: Undo histograms change Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/geolocation/geolocation_permission_context_android.h
diff --git a/chrome/browser/geolocation/geolocation_permission_context_android.h b/chrome/browser/geolocation/geolocation_permission_context_android.h
index 599382835f1bf612feff32d374248f4acfb4fd1b..b52eea03d99803e3b6742670ea9d74dba072a1da 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_android.h
+++ b/chrome/browser/geolocation/geolocation_permission_context_android.h
@@ -45,6 +45,16 @@ class PrefRegistrySimple;
class GeolocationPermissionContextAndroid
: public GeolocationPermissionContext {
public:
+ // This enum is used in histograms, thus is append only. Do not re-order or
+ // remove any entries, or add any except at the end.
+ enum class LocationSettingsDialogBackOff {
+ kNoBackOff,
+ kOneWeek,
+ kOneMonth,
+ kThreeMonths,
+ kCount,
+ };
+
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
explicit GeolocationPermissionContextAndroid(Profile* profile);
@@ -88,13 +98,13 @@ class GeolocationPermissionContextAndroid
const GURL& embedding_origin) const override;
// Functions to handle back off for showing the Location Settings Dialog.
- std::string GetLocationSettingsBackOffLevelPref(
- const GURL& requesting_origin) const;
- std::string GetLocationSettingsNextShowPref(
- const GURL& requesting_origin) const;
- bool IsInLocationSettingsBackOff(const GURL& requesting_origin) const;
- void ResetLocationSettingsBackOff(const GURL& requesting_origin);
- void UpdateLocationSettingsBackOff(const GURL& requesting_origin);
+ std::string GetLocationSettingsBackOffLevelPref(bool is_default_search) const;
+ std::string GetLocationSettingsNextShowPref(bool is_default_search) const;
+ bool IsInLocationSettingsBackOff(bool is_default_search) const;
+ void ResetLocationSettingsBackOff(bool is_default_search);
+ void UpdateLocationSettingsBackOff(bool is_default_search);
+ LocationSettingsDialogBackOff LocationSettingsBackOffLevel(
+ bool is_default_search) const;
// Returns whether location access is possible for the given origin. Ignores
// Location Settings Dialog backoff, as the backoff is ignored if the user
« no previous file with comments | « no previous file | chrome/browser/geolocation/geolocation_permission_context_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698