OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
oshima
2015/11/02 19:13:49
nuke (c)
Luis Héctor Chávez
2015/11/04 17:49:19
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "components/arc/arc_bridge_service_factory.h" | |
6 | |
7 #include "components/arc/arc_bridge_service.h" | |
8 #include "components/keyed_service/content/browser_context_dependency_manager.h" | |
9 #include "content/public/browser/browser_thread.h" | |
10 | |
11 namespace arc { | |
12 | |
13 // static | |
14 ArcBridgeService* ArcBridgeServiceFactory::GetForBrowserContext( | |
15 content::BrowserContext* context) { | |
16 return static_cast<ArcBridgeService*>( | |
17 GetInstance()->GetServiceForBrowserContext(context, true)); | |
18 } | |
19 | |
20 ArcBridgeServiceFactory* ArcBridgeServiceFactory::GetInstance() { | |
21 return base::Singleton<ArcBridgeServiceFactory>::get(); | |
22 } | |
23 | |
24 ArcBridgeServiceFactory::ArcBridgeServiceFactory() | |
25 : BrowserContextKeyedServiceFactory( | |
26 "ArcBridgeService", | |
27 BrowserContextDependencyManager::GetInstance()) {} | |
28 | |
29 ArcBridgeServiceFactory::~ArcBridgeServiceFactory() {} | |
30 | |
31 KeyedService* ArcBridgeServiceFactory::BuildServiceInstanceFor( | |
32 content::BrowserContext* profile) const { | |
33 return new ArcBridgeService( | |
34 content::BrowserThread::GetMessageLoopProxyForThread( | |
35 content::BrowserThread::FILE)); | |
36 } | |
37 | |
38 bool ArcBridgeServiceFactory::ServiceIsCreatedWithBrowserContext() const { | |
39 return true; | |
40 } | |
41 | |
42 } // namespace arc | |
OLD | NEW |