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

Side by Side Diff: chromeos/arc/bridge/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: 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.
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 "chromeos/arc/bridge/arc_bridge_service_factory.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chromeos/arc/bridge/arc_bridge_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10
11 namespace arc {
12
13 // static
14 ArcBridgeService* ArcBridgeServiceFactory::GetForProfile(Profile* profile) {
15 return static_cast<ArcBridgeService*>(
16 GetInstance()->GetServiceForBrowserContext(profile, true));
17 }
18
19 ArcBridgeServiceFactory* ArcBridgeServiceFactory::GetInstance() {
20 return base::Singleton<ArcBridgeServiceFactory>::get();
21 }
22
23 ArcBridgeServiceFactory::ArcBridgeServiceFactory()
24 : BrowserContextKeyedServiceFactory(
25 "ArcBridgeService",
26 BrowserContextDependencyManager::GetInstance()) {}
27
28 ArcBridgeServiceFactory::~ArcBridgeServiceFactory() {}
29
30 KeyedService* ArcBridgeServiceFactory::BuildServiceInstanceFor(
31 content::BrowserContext* profile) const {
32 return new ArcBridgeService(static_cast<Profile*>(profile));
33 }
34
35 bool ArcBridgeServiceFactory::ServiceIsCreatedWithBrowserContext() const {
36 return true;
37 }
38
39 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698