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

Side by Side Diff: chrome/browser/android/search_geolocation_disclosure_tab_helper.h

Issue 2518963002: Record metric of geo permission before and after showing the disclosure. (Closed)
Patch Set: Feedback 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/search_geolocation_disclosure_tab_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/search_geolocation_disclosure_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698