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

Unified Diff: chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.h

Issue 2885763002: Only show search geolocation disclosure on omnibox searches or API use. (Closed)
Patch Set: Add comments Created 3 years, 7 months 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 | chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.h
diff --git a/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.h b/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.h
index 2215c4016e8a2ed5532d8bf775a066fef5e1a87a..3955e664ced14528c5104bb8d8e87393d5e9ab7b 100644
--- a/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.h
+++ b/chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.h
@@ -30,7 +30,7 @@ class SearchGeolocationDisclosureTabHelper
void NavigationEntryCommitted(
const content::LoadCommittedDetails& load_details) override;
- void MaybeShowDisclosure(const GURL& gurl);
+ void MaybeShowDisclosureForAPIAccess(const GURL& gurl);
static void ResetDisclosure(Profile* profile);
@@ -44,7 +44,18 @@ class SearchGeolocationDisclosureTabHelper
friend class content::WebContentsUserData<
SearchGeolocationDisclosureTabHelper>;
- bool ShouldShowDisclosureForUrl(const GURL& gurl);
+ void MaybeShowDisclosureForNavigation(const GURL& gurl);
+ void MaybeShowDisclosureForValidUrl(const GURL& gurl);
+
+ // Determines if the disclosure should be shown for the URL when a navigation
+ // to the URL occurs. This is the case whenever the URL is a result of an
+ // omnibox search, as it will result in X-Geo headers being sent.
+ bool ShouldShowDisclosureForNavigation(const GURL& gurl);
+
+ // Determine if the disclosure should be shown for the URL when a page on the
+ // URL uses the geolocation API. This is the case if the url's access to the
+ // geolocation API is allowed due to the geolocation DSE setting.
+ bool ShouldShowDisclosureForAPIAccess(const GURL& gurl);
// Record metrics, once per client, of the permission state before and after
// the disclosure has been shown.
« no previous file with comments | « no previous file | chrome/browser/android/search_geolocation/search_geolocation_disclosure_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698