diff options
author | stevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 03:41:12 +0000 |
---|---|---|
committer | stevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-02 03:41:12 +0000 |
commit | 3f89d55f13b6397a49fb68c63c90c67606f4aa72 (patch) | |
tree | 5e7eaeb2c82507f3e1f79e12dff7903b529becda /chrome/browser/google/google_search_metrics.cc | |
parent | fa931bbb43ccf6c934de265266357479f9790648 (diff) | |
download | chromium_src-3f89d55f13b6397a49fb68c63c90c67606f4aa72.zip chromium_src-3f89d55f13b6397a49fb68c63c90c67606f4aa72.tar.gz chromium_src-3f89d55f13b6397a49fb68c63c90c67606f4aa72.tar.bz2 |
Add declarations and helpers for Google Search counting.
We want to count the number of searches from various access points in Chrome. To do this, we've added a new UMA enumerated histogram to track these values (GoogleSearch.AccessPoint). These are the necessary declarations for various search access points that will be added shortly.
We've also added a IsGoogleSearchUrl helper to google_util to identify search URLs.
BUG=
TEST=Ensure that unit tests GoogleUtilTest all succeed.
Review URL: http://codereview.chromium.org/9452039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/google/google_search_metrics.cc')
-rw-r--r-- | chrome/browser/google/google_search_metrics.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/google/google_search_metrics.cc b/chrome/browser/google/google_search_metrics.cc new file mode 100644 index 0000000..b3dd3b8 --- /dev/null +++ b/chrome/browser/google/google_search_metrics.cc @@ -0,0 +1,20 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/google/google_search_metrics.h" + +#include "base/logging.h" +#include "base/metrics/histogram.h" +#include "chrome/browser/metrics/metrics_service.h" + +GoogleSearchMetrics::GoogleSearchMetrics() { +} + +GoogleSearchMetrics::~GoogleSearchMetrics() { +} + +void GoogleSearchMetrics::RecordGoogleSearch(AccessPoint ap) const { + DCHECK_NE(AP_BOUNDARY, ap); + UMA_HISTOGRAM_ENUMERATION("GoogleSearch.AccessPoint", ap, AP_BOUNDARY); +} |