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

Side by Side Diff: components/omnibox/browser/omnibox_event_global_tracker.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/omnibox/browser/omnibox_event_global_tracker.h" 5 #include "components/omnibox/browser/omnibox_event_global_tracker.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 8
9 OmniboxEventGlobalTracker* OmniboxEventGlobalTracker::GetInstance() { 9 OmniboxEventGlobalTracker* OmniboxEventGlobalTracker::GetInstance() {
10 return Singleton<OmniboxEventGlobalTracker>::get(); 10 return base::Singleton<OmniboxEventGlobalTracker>::get();
11 } 11 }
12 12
13 scoped_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription> 13 scoped_ptr<base::CallbackList<void(OmniboxLog*)>::Subscription>
14 OmniboxEventGlobalTracker::RegisterCallback(const OnURLOpenedCallback& cb) { 14 OmniboxEventGlobalTracker::RegisterCallback(const OnURLOpenedCallback& cb) {
15 return on_url_opened_callback_list_.Add(cb); 15 return on_url_opened_callback_list_.Add(cb);
16 } 16 }
17 17
18 void OmniboxEventGlobalTracker::OnURLOpened(OmniboxLog* log) { 18 void OmniboxEventGlobalTracker::OnURLOpened(OmniboxLog* log) {
19 on_url_opened_callback_list_.Notify(log); 19 on_url_opened_callback_list_.Notify(log);
20 } 20 }
21 21
22 OmniboxEventGlobalTracker::OmniboxEventGlobalTracker() {} 22 OmniboxEventGlobalTracker::OmniboxEventGlobalTracker() {}
23 23
24 OmniboxEventGlobalTracker::~OmniboxEventGlobalTracker() {} 24 OmniboxEventGlobalTracker::~OmniboxEventGlobalTracker() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698