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

Side by Side Diff: chromeos/arc/bridge/arc_bridge_service_factory.h

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) 2012 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 #ifndef CHROMEOS_ARC_BRIDGE_ARC_BRIDGE_SERVICE_FACTORY_H_
6 #define CHROMEOS_ARC_BRIDGE_ARC_BRIDGE_SERVICE_FACTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
10
11 class Profile;
12
13 namespace arc {
14
15 class ArcBridgeService;
16
17 // Singleton that owns all ArcBridgeServices and associates them with
18 // Profiles. Listens for the Profile's destruction notification and cleans up
19 // the associated ArcBridgeService.
20 class ArcBridgeServiceFactory : public BrowserContextKeyedServiceFactory {
oshima 2015/10/23 20:29:45 Does this have to be BrowserContext? can't you jus
Luis Héctor Chávez 2015/10/27 00:37:48 Changed the ArcBridgeService into a KeyedService.
21 public:
22 static ArcBridgeService* GetForProfile(Profile* profile);
23
24 static ArcBridgeServiceFactory* GetInstance();
25
26 private:
27 friend struct base::DefaultSingletonTraits<ArcBridgeServiceFactory>;
28
29 ArcBridgeServiceFactory();
30 ~ArcBridgeServiceFactory() override;
31
32 // BrowserContextKeyedServiceFactory:
33 KeyedService* BuildServiceInstanceFor(
34 content::BrowserContext* profile) const override;
35 bool ServiceIsCreatedWithBrowserContext() const override;
36 };
37
38 } // namespace arc
39
40 #endif // CHROMEOS_ARC_BRIDGE_ARC_BRIDGE_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698