| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |