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

Side by Side Diff: chrome/browser/google/google_search_counter.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/google/google_search_counter.h" 5 #include "chrome/browser/google/google_search_counter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/google/core/browser/google_util.h" 8 #include "components/google/core/browser/google_util.h"
9 #include "content/public/browser/navigation_controller.h" 9 #include "content/public/browser/navigation_controller.h"
10 #include "content/public/browser/navigation_details.h" 10 #include "content/public/browser/navigation_details.h"
11 #include "content/public/browser/navigation_entry.h" 11 #include "content/public/browser/navigation_entry.h"
12 #include "content/public/browser/notification_service.h" 12 #include "content/public/browser/notification_service.h"
13 #include "content/public/browser/notification_types.h" 13 #include "content/public/browser/notification_types.h"
14 14
15 // static 15 // static
16 void GoogleSearchCounter::RegisterForNotifications() { 16 void GoogleSearchCounter::RegisterForNotifications() {
17 GoogleSearchCounter::GetInstance()->RegisterForNotificationsInternal(); 17 GoogleSearchCounter::GetInstance()->RegisterForNotificationsInternal();
18 } 18 }
19 19
20 // static 20 // static
21 GoogleSearchCounter* GoogleSearchCounter::GetInstance() { 21 GoogleSearchCounter* GoogleSearchCounter::GetInstance() {
22 return Singleton<GoogleSearchCounter>::get(); 22 return base::Singleton<GoogleSearchCounter>::get();
23 } 23 }
24 24
25 GoogleSearchMetrics::AccessPoint 25 GoogleSearchMetrics::AccessPoint
26 GoogleSearchCounter::GetGoogleSearchAccessPointForSearchNavEntry( 26 GoogleSearchCounter::GetGoogleSearchAccessPointForSearchNavEntry(
27 const content::NavigationEntry& entry) const { 27 const content::NavigationEntry& entry) const {
28 DCHECK(google_util::IsGoogleSearchUrl(entry.GetURL())); 28 DCHECK(google_util::IsGoogleSearchUrl(entry.GetURL()));
29 29
30 // If the |entry| is FROM_ADDRESS_BAR, it comes from the omnibox; if it's 30 // If the |entry| is FROM_ADDRESS_BAR, it comes from the omnibox; if it's
31 // GENERATED, the user was doing a search, rather than doing a navigation to a 31 // GENERATED, the user was doing a search, rather than doing a navigation to a
32 // search URL (e.g. from hisotry, or pasted in). 32 // search URL (e.g. from hisotry, or pasted in).
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 const content::NotificationSource& source, 91 const content::NotificationSource& source,
92 const content::NotificationDetails& details) { 92 const content::NotificationDetails& details) {
93 switch (type) { 93 switch (type) {
94 case content::NOTIFICATION_NAV_ENTRY_COMMITTED: 94 case content::NOTIFICATION_NAV_ENTRY_COMMITTED:
95 ProcessCommittedEntry(source, details); 95 ProcessCommittedEntry(source, details);
96 break; 96 break;
97 default: 97 default:
98 NOTREACHED(); 98 NOTREACHED();
99 } 99 }
100 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/google/google_search_counter.h ('k') | chrome/browser/google/google_url_tracker_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698