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

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: 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
raymes 2017/04/04 22:36:39 Sorry my memory on this code isn't the best. Is it
benwells 2017/04/05 08:39:49 Yes that's right, but not a problem. What we're tr
+
prefs->SetBoolean(prefs::kSearchGeolocationPostDisclosureMetricsRecorded,
true);
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698