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

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

Issue 2475213002: Update the Google Search geolocation disclosure to make it more obvious. (Closed)
Patch Set: Introduce overload Created 4 years, 1 month 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_disclosure_tab_helper.h
diff --git a/chrome/browser/android/search_geolocation_disclosure_tab_helper.h b/chrome/browser/android/search_geolocation_disclosure_tab_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..a219115c31dca67aad237ac116db19e40427d2e9
--- /dev/null
+++ b/chrome/browser/android/search_geolocation_disclosure_tab_helper.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_
+#define CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_
+
+#include "base/macros.h"
+#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/web_contents_user_data.h"
+#include "url/gurl.h"
+
+class Profile;
+
+// Tab helper to show the search geolocation disclosure.
+class SearchGeolocationDisclosureTabHelper
+ : public content::WebContentsObserver,
+ public content::WebContentsUserData<
+ SearchGeolocationDisclosureTabHelper> {
+ public:
+ ~SearchGeolocationDisclosureTabHelper() override;
+
+ // content::WebContentsObserver overrides.
+ void NavigationEntryCommitted(
+ const content::LoadCommittedDetails& load_details) override;
+
+ private:
+ explicit SearchGeolocationDisclosureTabHelper(content::WebContents* contents);
+ friend class content::WebContentsUserData<
+ SearchGeolocationDisclosureTabHelper>;
+
+ void MaybeShowDefaultSearchGeolocationDisclosure(GURL gurl);
+ Profile* GetProfile();
+
+ bool consistent_geolocation_enabled_;
+
+ DISALLOW_COPY_AND_ASSIGN(SearchGeolocationDisclosureTabHelper);
+};
+
+#endif // CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698