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

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

Issue 2585153002: Record search geolocation pre-disclosure metrics earlier (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
diff --git a/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc b/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
index 30d9e8cf972ba4d262e0a8c5a6417feae6aa0fb8..c671b624f9c1f19ce9cad086c96f53c4a2daffc6 100644
--- a/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
+++ b/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
@@ -138,6 +138,10 @@ void SearchGeolocationDisclosureTabHelper::
if (!Java_GeolocationHeader_hasGeolocationPermission(env))
return;
+ // Record metrics for the state of permissions before the disclosure has been
+ // shown.
+ RecordPreDisclosureMetrics(gurl);
+
// Only show the disclosure if the geolocation permission is set to ASK
// (i.e. has not been explicitly set or revoked).
blink::mojom::PermissionStatus status =
@@ -147,10 +151,6 @@ void SearchGeolocationDisclosureTabHelper::
if (status != blink::mojom::PermissionStatus::ASK)
return;
- // Record metrics for the state of permissions before the disclosure has been
- // shown.
- RecordPreDisclosureMetrics(gurl);
-
// All good, let's show the disclosure and increment the shown count.
SearchGeolocationDisclosureInfoBarDelegate::Create(web_contents(), gurl);
shown_count++;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698