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

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

Issue 2612993002: Make geolocation API and X-Geo header access consistent (Closed)
Patch Set: Fix some things; rebase Created 3 years, 11 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
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 e92959df0b38ff12f04bbc8049c81a9843841e79..9cd7a6eccfc571072da2d012d0fe2e709e108034 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
@@ -84,6 +84,14 @@ void SearchGeolocationDisclosureTabHelper::NavigationEntryCommitted(
}
// static
+void SearchGeolocationDisclosureTabHelper::ResetDisclosure(Profile* profile) {
+ PrefService* prefs = profile->GetPrefs();
+ prefs->ClearPref(prefs::kSearchGeolocationDisclosureShownCount);
+ prefs->ClearPref(prefs::kSearchGeolocationDisclosureLastShowDate);
+ prefs->ClearPref(prefs::kSearchGeolocationDisclosureDismissed);
+}
+
+// static
void SearchGeolocationDisclosureTabHelper::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kSearchGeolocationDisclosureDismissed,

Powered by Google App Engine
This is Rietveld 408576698