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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_
6 #define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_
8 #include "build/build_config.h"
10 // A thin helper class used by parties interested in reporting Google search
11 // metrics (mostly counts of searches from different access points). This class
12 // partly exists to make testing easier.
13 class GoogleSearchMetrics
{
15 // Various Google Search access points, to be used with UMA enumeration
21 AP_DIRECT_NAV_INSTANT
,
25 AP_SEARCH_APP_INSTANT
,
31 GoogleSearchMetrics();
32 virtual ~GoogleSearchMetrics();
34 // Record a single Google search from source |ap|.
35 virtual void RecordGoogleSearch(AccessPoint ap
) const;
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;
45 #endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_SEARCH_METRICS_H_