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

Side by Side Diff: components/google/core/browser/google_search_metrics.h

Issue 342053002: Add UMA metrics for Android Chrome Google Search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/google/core/browser/google_search_metrics.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_ 5 #ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_
6 #define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_ 6 #define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_
7 7
8 #include "build/build_config.h"
9
8 // A thin helper class used by parties interested in reporting Google search 10 // A thin helper class used by parties interested in reporting Google search
9 // metrics (mostly counts of searches from different access points). This class 11 // metrics (mostly counts of searches from different access points). This class
10 // partly exists to make testing easier. 12 // partly exists to make testing easier.
11 class GoogleSearchMetrics { 13 class GoogleSearchMetrics {
12 public: 14 public:
13 // Various Google Search access points, to be used with UMA enumeration 15 // Various Google Search access points, to be used with UMA enumeration
14 // histograms. 16 // histograms.
15 enum AccessPoint { 17 enum AccessPoint {
16 AP_OMNIBOX, 18 AP_OMNIBOX,
17 AP_OMNIBOX_INSTANT, 19 AP_OMNIBOX_INSTANT,
18 AP_DIRECT_NAV, 20 AP_DIRECT_NAV,
19 AP_DIRECT_NAV_INSTANT, 21 AP_DIRECT_NAV_INSTANT,
20 AP_HOME_PAGE, 22 AP_HOME_PAGE,
21 AP_HOME_PAGE_INSTANT, 23 AP_HOME_PAGE_INSTANT,
22 AP_SEARCH_APP, 24 AP_SEARCH_APP,
23 AP_SEARCH_APP_INSTANT, 25 AP_SEARCH_APP_INSTANT,
24 AP_OTHER, 26 AP_OTHER,
25 AP_OTHER_INSTANT, 27 AP_OTHER_INSTANT,
26 AP_BOUNDARY, 28 AP_BOUNDARY,
27 }; 29 };
28 30
29 GoogleSearchMetrics(); 31 GoogleSearchMetrics();
30 virtual ~GoogleSearchMetrics(); 32 virtual ~GoogleSearchMetrics();
31 33
32 // Record a single Google search from source |ap|. 34 // Record a single Google search from source |ap|.
33 virtual void RecordGoogleSearch(AccessPoint ap) const; 35 virtual void RecordGoogleSearch(AccessPoint ap) const;
36
37 #if defined(OS_ANDROID)
38 // Record a single Android Google search from source |ap|. |prerender_enabled|
39 // is set to true when prerendering is enabled via settings.
40 virtual void RecordAndroidGoogleSearch(AccessPoint ap,
41 bool prerender_enabled) const;
42 #endif
34 }; 43 };
35 44
36 #endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_ 45 #endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | components/google/core/browser/google_search_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698