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

Unified Diff: chrome/browser/google/google_search_counter_android.cc

Issue 1320553002: [Cleanup] Remove the no longer used GoogleSearch.AccessPoint metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a stale forward declaration Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google/google_search_counter_android.cc
diff --git a/chrome/browser/google/google_search_counter_android.cc b/chrome/browser/google/google_search_counter_android.cc
deleted file mode 100644
index 17699bee30e8f7293949ffbe3dee06a5640810bf..0000000000000000000000000000000000000000
--- a/chrome/browser/google/google_search_counter_android.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2014 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_counter_android.h"
-
-#include "base/logging.h"
-#include "chrome/browser/google/google_search_counter.h"
-#include "chrome/browser/prerender/prerender_manager.h"
-#include "chrome/browser/prerender/prerender_manager_factory.h"
-#include "components/google/core/browser/google_search_metrics.h"
-#include "content/public/browser/navigation_details.h"
-#include "content/public/browser/navigation_entry.h"
-#include "content/public/browser/notification_service.h"
-#include "content/public/browser/notification_types.h"
-
-GoogleSearchCounterAndroid::GoogleSearchCounterAndroid(Profile* profile)
- : profile_(profile) {
- // We always listen for all COMMITTED navigations from all sources, as any
- // one of them could be a navigation of interest.
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::NotificationService::AllSources());
-}
-
-GoogleSearchCounterAndroid::~GoogleSearchCounterAndroid() {
-}
-
-void GoogleSearchCounterAndroid::ProcessCommittedEntry(
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- GoogleSearchCounter* counter = GoogleSearchCounter::GetInstance();
- DCHECK(counter);
- if (!counter->ShouldRecordCommittedDetails(details))
- return;
-
- const content::NavigationEntry& entry =
- *content::Details<content::LoadCommittedDetails>(details)->entry;
- prerender::PrerenderManager* prerender_manager =
- prerender::PrerenderManagerFactory::GetForProfile(profile_);
- // |prerender_manager| is NULL when prerendering is disabled.
- bool prerender_enabled =
- prerender_manager ? prerender_manager->IsEnabled() : false;
- counter->search_metrics()->RecordAndroidGoogleSearch(
- counter->GetGoogleSearchAccessPointForSearchNavEntry(entry),
- prerender_enabled);
-}
-
-void GoogleSearchCounterAndroid::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK_EQ(content::NOTIFICATION_NAV_ENTRY_COMMITTED, type);
- ProcessCommittedEntry(source, details);
-}
« no previous file with comments | « chrome/browser/google/google_search_counter_android.h ('k') | chrome/browser/google/google_search_counter_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698