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++; |