| 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..fc195722793e3094b5a372f19f24b2c0620be125 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();
|
| @@ -135,6 +130,11 @@ void SearchGeolocationDisclosureTabHelper::MaybeShowDisclosure(
|
| if (!service->GetDSEGeolocationSetting())
|
| return;
|
|
|
| + // Check that the Chrome app has geolocation permission.
|
| + JNIEnv* env = base::android::AttachCurrentThread();
|
| + if (!Java_GeolocationHeader_hasGeolocationPermission(env))
|
| + return;
|
| +
|
| // All good, let's show the disclosure and increment the shown count.
|
| SearchGeolocationDisclosureInfoBarDelegate::Create(web_contents(), gurl);
|
| shown_count++;
|
|
|