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

Side by Side Diff: chrome/browser/local_discovery/privet_notifications_factory.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/local_discovery/privet_notifications_factory.h" 5 #include "chrome/browser/local_discovery/privet_notifications_factory.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/local_discovery/privet_notifications.h" 8 #include "chrome/browser/local_discovery/privet_notifications.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 10
11 namespace local_discovery { 11 namespace local_discovery {
12 12
13 PrivetNotificationServiceFactory* 13 PrivetNotificationServiceFactory*
14 PrivetNotificationServiceFactory::GetInstance() { 14 PrivetNotificationServiceFactory::GetInstance() {
15 return Singleton<PrivetNotificationServiceFactory>::get(); 15 return base::Singleton<PrivetNotificationServiceFactory>::get();
16 } 16 }
17 17
18 PrivetNotificationServiceFactory::PrivetNotificationServiceFactory() 18 PrivetNotificationServiceFactory::PrivetNotificationServiceFactory()
19 : BrowserContextKeyedServiceFactory( 19 : BrowserContextKeyedServiceFactory(
20 "PrivetNotificationService", 20 "PrivetNotificationService",
21 BrowserContextDependencyManager::GetInstance()) { 21 BrowserContextDependencyManager::GetInstance()) {
22 } 22 }
23 23
24 PrivetNotificationServiceFactory::~PrivetNotificationServiceFactory() { 24 PrivetNotificationServiceFactory::~PrivetNotificationServiceFactory() {
25 } 25 }
26 26
27 KeyedService* PrivetNotificationServiceFactory::BuildServiceInstanceFor( 27 KeyedService* PrivetNotificationServiceFactory::BuildServiceInstanceFor(
28 content::BrowserContext* profile) const { 28 content::BrowserContext* profile) const {
29 return new PrivetNotificationService(profile); 29 return new PrivetNotificationService(profile);
30 } 30 }
31 31
32 bool 32 bool
33 PrivetNotificationServiceFactory::ServiceIsCreatedWithBrowserContext() const { 33 PrivetNotificationServiceFactory::ServiceIsCreatedWithBrowserContext() const {
34 return PrivetNotificationService::IsEnabled(); 34 return PrivetNotificationService::IsEnabled();
35 } 35 }
36 36
37 bool PrivetNotificationServiceFactory::ServiceIsNULLWhileTesting() const { 37 bool PrivetNotificationServiceFactory::ServiceIsNULLWhileTesting() const {
38 return true; 38 return true;
39 } 39 }
40 40
41 } // namespace local_discovery 41 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/local_discovery/privet_notifications_factory.h ('k') | chrome/browser/local_discovery/privet_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698