Index: chrome/browser/managed_mode/managed_user_service_factory.cc |
diff --git a/chrome/browser/managed_mode/managed_user_service_factory.cc b/chrome/browser/managed_mode/managed_user_service_factory.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..55aaa03e441c7625f5d304409dcf4f45442f715b |
--- /dev/null |
+++ b/chrome/browser/managed_mode/managed_user_service_factory.cc |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
Pam (message me for reviews)
2013/01/14 14:12:42
Guess what?
Bernhard Bauer
2013/01/15 14:24:44
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/managed_mode/managed_user_service_factory.h" |
+ |
+#include "chrome/browser/managed_mode/managed_user_service.h" |
+#include "chrome/browser/profiles/profile_dependency_manager.h" |
+ |
+// static |
+ManagedUserService* ManagedUserServiceFactory::GetForProfile(Profile* profile) { |
+ return static_cast<ManagedUserService*>( |
+ GetInstance()->GetServiceForProfile(profile, true)); |
+} |
+ |
+// static |
+ManagedUserServiceFactory* ManagedUserServiceFactory::GetInstance() { |
+ return Singleton<ManagedUserServiceFactory>::get(); |
+} |
+ |
+// static |
+ProfileKeyedService* ManagedUserServiceFactory::BuildInstanceFor( |
+ Profile* profile) { |
+ return new ManagedUserService(profile); |
+} |
+ |
+ManagedUserServiceFactory::ManagedUserServiceFactory() |
+ : ProfileKeyedServiceFactory("ManagedUserService", |
+ ProfileDependencyManager::GetInstance()) {} |
Pam (message me for reviews)
2013/01/14 14:12:42
Don't we have some dependencies to register? Exten
Bernhard Bauer
2013/01/15 14:24:44
True, we need ExtensionSystem. Done.
|
+ |
+ManagedUserServiceFactory::~ManagedUserServiceFactory() {} |
+ |
+bool ManagedUserServiceFactory::ServiceRedirectedInIncognito() const { |
+ return true; |
+} |
+ |
+ProfileKeyedService* ManagedUserServiceFactory::BuildServiceInstanceFor( |
+ Profile* profile) const { |
+ return BuildInstanceFor(profile); |
+} |