| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 #include "content/public/browser/web_contents_user_data.h" | 10 #include "content/public/browser/web_contents_user_data.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 void NavigationEntryCommitted( | 28 void NavigationEntryCommitted( |
| 29 const content::LoadCommittedDetails& load_details) override; | 29 const content::LoadCommittedDetails& load_details) override; |
| 30 | 30 |
| 31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 31 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 explicit SearchGeolocationDisclosureTabHelper(content::WebContents* contents); | 34 explicit SearchGeolocationDisclosureTabHelper(content::WebContents* contents); |
| 35 friend class content::WebContentsUserData< | 35 friend class content::WebContentsUserData< |
| 36 SearchGeolocationDisclosureTabHelper>; | 36 SearchGeolocationDisclosureTabHelper>; |
| 37 | 37 |
| 38 void MaybeShowDefaultSearchGeolocationDisclosure(GURL gurl); | 38 void MaybeShowDefaultSearchGeolocationDisclosure(const GURL& gurl); |
| 39 |
| 40 // Record metrics, once per client, of the permission state before and after |
| 41 // the disclosure has been shown. |
| 42 void RecordPreDisclosureMetrics(const GURL& gurl); |
| 43 void RecordPostDisclosureMetrics(const GURL& gurl); |
| 39 Profile* GetProfile(); | 44 Profile* GetProfile(); |
| 40 | 45 |
| 41 bool consistent_geolocation_enabled_; | 46 bool consistent_geolocation_enabled_; |
| 42 | 47 |
| 43 DISALLOW_COPY_AND_ASSIGN(SearchGeolocationDisclosureTabHelper); | 48 DISALLOW_COPY_AND_ASSIGN(SearchGeolocationDisclosureTabHelper); |
| 44 }; | 49 }; |
| 45 | 50 |
| 46 #endif // CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_ | 51 #endif // CHROME_BROWSER_ANDROID_SEARCH_GEOLOCATION_DISCLOSURE_TAB_HELPER_H_ |
| OLD | NEW |