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/platform_keys/platform_keys_service_factory.h" | 5 #include "chrome/browser/chromeos/platform_keys/platform_keys_service_factory.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 // static | 72 // static |
73 PlatformKeysService* PlatformKeysServiceFactory::GetForBrowserContext( | 73 PlatformKeysService* PlatformKeysServiceFactory::GetForBrowserContext( |
74 content::BrowserContext* context) { | 74 content::BrowserContext* context) { |
75 return static_cast<PlatformKeysService*>( | 75 return static_cast<PlatformKeysService*>( |
76 GetInstance()->GetServiceForBrowserContext(context, true)); | 76 GetInstance()->GetServiceForBrowserContext(context, true)); |
77 } | 77 } |
78 | 78 |
79 // static | 79 // static |
80 PlatformKeysServiceFactory* PlatformKeysServiceFactory::GetInstance() { | 80 PlatformKeysServiceFactory* PlatformKeysServiceFactory::GetInstance() { |
81 return Singleton<PlatformKeysServiceFactory>::get(); | 81 return base::Singleton<PlatformKeysServiceFactory>::get(); |
82 } | 82 } |
83 | 83 |
84 PlatformKeysServiceFactory::PlatformKeysServiceFactory() | 84 PlatformKeysServiceFactory::PlatformKeysServiceFactory() |
85 : BrowserContextKeyedServiceFactory( | 85 : BrowserContextKeyedServiceFactory( |
86 "PlatformKeysService", | 86 "PlatformKeysService", |
87 BrowserContextDependencyManager::GetInstance()) { | 87 BrowserContextDependencyManager::GetInstance()) { |
88 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); | 88 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); |
89 DependsOn(policy::ProfilePolicyConnectorFactory::GetInstance()); | 89 DependsOn(policy::ProfilePolicyConnectorFactory::GetInstance()); |
90 } | 90 } |
91 | 91 |
(...skipping 17 matching lines...) Expand all Loading... |
109 | 109 |
110 PlatformKeysService* const service = new PlatformKeysService( | 110 PlatformKeysService* const service = new PlatformKeysService( |
111 policy_connector->IsManaged(), profile->GetPrefs(), | 111 policy_connector->IsManaged(), profile->GetPrefs(), |
112 policy_connector->policy_service(), context, store); | 112 policy_connector->policy_service(), context, store); |
113 | 113 |
114 service->SetSelectDelegate(make_scoped_ptr(new DefaultSelectDelegate())); | 114 service->SetSelectDelegate(make_scoped_ptr(new DefaultSelectDelegate())); |
115 return service; | 115 return service; |
116 } | 116 } |
117 | 117 |
118 } // namespace chromeos | 118 } // namespace chromeos |
OLD | NEW |