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

Side by Side Diff: chrome/browser/chromeos/policy/consumer_enrollment_handler_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/policy/consumer_enrollment_handler_factory.h" 5 #include "chrome/browser/chromeos/policy/consumer_enrollment_handler_factory.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/browser_process_platform_part.h" 8 #include "chrome/browser/browser_process_platform_part.h"
9 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 9 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
10 #include "chrome/browser/chromeos/policy/consumer_enrollment_handler.h" 10 #include "chrome/browser/chromeos/policy/consumer_enrollment_handler.h"
(...skipping 11 matching lines...) Expand all
22 ConsumerEnrollmentHandler* 22 ConsumerEnrollmentHandler*
23 ConsumerEnrollmentHandlerFactory::GetForBrowserContext( 23 ConsumerEnrollmentHandlerFactory::GetForBrowserContext(
24 content::BrowserContext* context) { 24 content::BrowserContext* context) {
25 return static_cast<ConsumerEnrollmentHandler*>( 25 return static_cast<ConsumerEnrollmentHandler*>(
26 GetInstance()->GetServiceForBrowserContext(context, true)); 26 GetInstance()->GetServiceForBrowserContext(context, true));
27 } 27 }
28 28
29 // static 29 // static
30 ConsumerEnrollmentHandlerFactory* 30 ConsumerEnrollmentHandlerFactory*
31 ConsumerEnrollmentHandlerFactory::GetInstance() { 31 ConsumerEnrollmentHandlerFactory::GetInstance() {
32 return Singleton<ConsumerEnrollmentHandlerFactory>::get(); 32 return base::Singleton<ConsumerEnrollmentHandlerFactory>::get();
33 } 33 }
34 34
35 ConsumerEnrollmentHandlerFactory::ConsumerEnrollmentHandlerFactory() 35 ConsumerEnrollmentHandlerFactory::ConsumerEnrollmentHandlerFactory()
36 : BrowserContextKeyedServiceFactory( 36 : BrowserContextKeyedServiceFactory(
37 "ConsumerEnrollmentHandler", 37 "ConsumerEnrollmentHandler",
38 BrowserContextDependencyManager::GetInstance()) { 38 BrowserContextDependencyManager::GetInstance()) {
39 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance()); 39 DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
40 DependsOn(SigninManagerFactory::GetInstance()); 40 DependsOn(SigninManagerFactory::GetInstance());
41 } 41 }
42 42
(...skipping 26 matching lines...) Expand all
69 service, 69 service,
70 connector->GetDeviceManagementServiceForConsumer()); 70 connector->GetDeviceManagementServiceForConsumer());
71 } 71 }
72 72
73 bool ConsumerEnrollmentHandlerFactory::ServiceIsCreatedWithBrowserContext() 73 bool ConsumerEnrollmentHandlerFactory::ServiceIsCreatedWithBrowserContext()
74 const { 74 const {
75 return true; 75 return true;
76 } 76 }
77 77
78 } // namespace policy 78 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698