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

Side by Side Diff: components/arc/arc_bridge_service_factory.cc

Issue 1412863004: arc-bridge: Add the ARC Bridge Service (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Improved thread-safety Created 5 years, 1 month 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698