don't pretend to support dbus on windows in dbus_export.h
[chromium-blink-merge.git] / components / google / core / browser / google_search_metrics.cc
blobe9f305e9291fb7f4c68b1bc8865f6388723ecd08
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 #include "components/google/core/browser/google_search_metrics.h"
7 #include "base/logging.h"
8 #include "base/metrics/histogram.h"
10 GoogleSearchMetrics::GoogleSearchMetrics() {
13 GoogleSearchMetrics::~GoogleSearchMetrics() {
16 void GoogleSearchMetrics::RecordGoogleSearch(AccessPoint ap) const {
17 DCHECK_NE(AP_BOUNDARY, ap);
18 UMA_HISTOGRAM_ENUMERATION("GoogleSearch.AccessPoint", ap, AP_BOUNDARY);
21 #if defined(OS_ANDROID)
22 void GoogleSearchMetrics::RecordAndroidGoogleSearch(
23 AccessPoint ap,
24 bool prerender_enabled) const {
25 DCHECK_NE(AP_BOUNDARY, ap);
26 if (prerender_enabled) {
27 UMA_HISTOGRAM_ENUMERATION("GoogleSearch.AccessPoint_PrerenderEnabled",
28 ap, AP_BOUNDARY);
29 } else {
30 UMA_HISTOGRAM_ENUMERATION("GoogleSearch.AccessPoint_PrerenderDisabled",
31 ap, AP_BOUNDARY);
34 #endif