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

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

Issue 2603903002: 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 30d9e8cf972ba4d262e0a8c5a6417feae6aa0fb8..510990a56be3f9dfc70a0774ae426a5d8ae7311f 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