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

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: Fix tests Created 3 years, 9 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_android.h
diff --git a/chrome/browser/geolocation/geolocation_permission_context_android.h b/chrome/browser/geolocation/geolocation_permission_context_android.h
index 599382835f1bf612feff32d374248f4acfb4fd1b..4e4e4f430d008b2c3c86f43418caed461547154c 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_android.h
+++ b/chrome/browser/geolocation/geolocation_permission_context_android.h
@@ -45,6 +45,22 @@ class PrefRegistrySimple;
class GeolocationPermissionContextAndroid
: public GeolocationPermissionContext {
public:
+ enum class LocationSettingsDialogBackOff {
Ilya Sherman 2017/04/04 00:04:40 Please document that this enum is used to back an
benwells 2017/04/04 08:06:39 Done.
+ kOneWeek,
+ kOneMonth,
+ kThreeMonths,
+ kMax,
Ilya Sherman 2017/04/04 00:04:40 nit: I'd suggest using "kCount" to mean "the numbe
benwells 2017/04/04 08:06:39 Done.
+ };
+
+ static const char kGeolocationLSDShowDSEMetric[];
+ static const char kGeolocationLSDShowNonDSEMetric[];
+ static const char kGeolocationLSDSuppressDSEMetric[];
+ static const char kGeolocationLSDSuppressNonDSEMetric[];
+ static const char kGeolocationLSDAcceptDSEMetric[];
+ static const char kGeolocationLSDAcceptNonDSEMetric[];
+ static const char kGeolocationLSDDenyDSEMetric[];
+ static const char kGeolocationLSDDenyNonDSEMetric[];
+
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
explicit GeolocationPermissionContextAndroid(Profile* profile);
@@ -88,13 +104,12 @@ 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_dse) const;
+ std::string GetLocationSettingsNextShowPref(bool is_dse) const;
+ bool IsInLocationSettingsBackOff(bool is_dse) const;
+ void ResetLocationSettingsBackOff(bool is_dse);
+ void UpdateLocationSettingsBackOff(bool is_dse);
+ LocationSettingsDialogBackOff LocationSettingsBackOffLevel(bool is_dse) const;
// Returns whether location access is possible for the given origin. Ignores
// Location Settings Dialog backoff, as the backoff is ignored if the user

Powered by Google App Engine
This is Rietveld 408576698