Chromium Code Reviews| 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 43745792a37222d37066afc052d1dab92539d5ae..234628461110657fefbc6d6f84580b20cba66fa8 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 |
| @@ -87,11 +87,6 @@ void SearchGeolocationDisclosureTabHelper::MaybeShowDisclosure( |
| if (!ShouldShowDisclosureForUrl(gurl)) |
| return; |
| - // Check that the Chrome app has geolocation permission. |
| - JNIEnv* env = base::android::AttachCurrentThread(); |
| - if (!Java_GeolocationHeader_hasGeolocationPermission(env)) |
| - return; |
| - |
| // Don't show the infobar if the user has dismissed it, or they've seen it |
| // enough times already. |
| PrefService* prefs = GetProfile()->GetPrefs(); |
| @@ -116,6 +111,11 @@ void SearchGeolocationDisclosureTabHelper::MaybeShowDisclosure( |
| return; |
| } |
| + // Check that the Chrome app has geolocation permission. |
| + JNIEnv* env = base::android::AttachCurrentThread(); |
| + if (!Java_GeolocationHeader_hasGeolocationPermission(env)) |
| + return; |
|
raymes
2017/02/01 18:04:41
As discussed in person, we may want to move this r
|
| + |
| // Record metrics for the state of permissions before the disclosure has been |
| // shown. |
| RecordPreDisclosureMetrics(gurl); |