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

Unified Diff: chrome/browser/android/search_geolocation_disclosure_tab_helper.cc

Issue 2593943002: Don't show geolocation disclosure when in incognito mode. (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c671b624f9c1f19ce9cad086c96f53c4a2daffc6..82942d1b19893444835be1d0c20694626e245dbb 100644
--- a/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
+++ b/chrome/browser/android/search_geolocation_disclosure_tab_helper.cc
@@ -90,6 +90,10 @@ void SearchGeolocationDisclosureTabHelper::RegisterProfilePrefs(
void SearchGeolocationDisclosureTabHelper::
MaybeShowDefaultSearchGeolocationDisclosure(const GURL& gurl) {
+ // Don't show in incognito.
+ if (GetProfile()->IsOffTheRecord())
+ return;
+
// Only show the disclosure for default search navigations from the omnibox.
TemplateURLService* template_url_service =
TemplateURLServiceFactory::GetForProfile(GetProfile());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698