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

Unified Diff: chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc

Issue 2793253002: Log metrics for the new Default Search Engine geolocation setting. (Closed)
Patch Set: Use BooleanAllowed 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
Index: chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
diff --git a/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc b/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
index 91cd69c0889143249a62735c6e7f3b5205a2f011..3f02fa70b7bf431055d1dae1ce2a2372add2d883 100644
--- a/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
+++ b/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc
@@ -207,6 +207,12 @@ void SearchGeolocationDisclosureTabHelper::RecordPreDisclosureMetrics(
static_cast<base::HistogramBase::Sample>(status),
static_cast<base::HistogramBase::Sample>(CONTENT_SETTING_NUM_SETTINGS) +
1);
+
+ SearchGeolocationService* service =
+ SearchGeolocationService::Factory::GetForBrowserContext(GetProfile());
+ UMA_HISTOGRAM_BOOLEAN("GeolocationDisclosure.PreDisclosureDSESetting",
+ service->GetDSEGeolocationSetting());
+
prefs->SetBoolean(prefs::kSearchGeolocationPreDisclosureMetricsRecorded,
true);
}
@@ -226,6 +232,12 @@ void SearchGeolocationDisclosureTabHelper::RecordPostDisclosureMetrics(
static_cast<base::HistogramBase::Sample>(status),
static_cast<base::HistogramBase::Sample>(CONTENT_SETTING_NUM_SETTINGS) +
1);
+
+ SearchGeolocationService* service =
+ SearchGeolocationService::Factory::GetForBrowserContext(GetProfile());
+ UMA_HISTOGRAM_BOOLEAN("GeolocationDisclosure.PostDisclosureDSESetting",
+ service->GetDSEGeolocationSetting());
+
prefs->SetBoolean(prefs::kSearchGeolocationPostDisclosureMetricsRecorded,
true);
}

Powered by Google App Engine
This is Rietveld 408576698