| 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 510990a56be3f9dfc70a0774ae426a5d8ae7311f..82942d1b19893444835be1d0c20694626e245dbb 100644
|
| --- a/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
|
| +++ b/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
|
| @@ -142,6 +142,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 =
|
| @@ -151,10 +155,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++;
|
|
|