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

Unified Diff: components/arc/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: Added Pref names and separated file I/O to the correct thread Created 5 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: components/arc/arc_bridge_service_factory.h
diff --git a/components/arc/arc_bridge_service_factory.h b/components/arc/arc_bridge_service_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..156a55d0f25ae2f4bc514ff2166ad1036c4dd199
--- /dev/null
+++ b/components/arc/arc_bridge_service_factory.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
hidehiko 2015/10/28 17:48:45 nit: s/2012/2015/ :-).
Luis Héctor Chávez 2015/10/28 21:06:32 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_ARC_ARC_BRIDGE_SERVICE_FACTORY_H_
+#define COMPONENTS_ARC_ARC_BRIDGE_SERVICE_FACTORY_H_
+
+#include "base/memory/singleton.h"
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace arc {
+
+class ArcBridgeService;
+
+// Singleton that owns all ArcBridgeServices and associates them with
+// Profiles. Listens for the Profile's destruction notification and cleans up
+// the associated ArcBridgeService.
+class ArcBridgeServiceFactory : public BrowserContextKeyedServiceFactory {
+ public:
+ static ArcBridgeService* GetForBrowserContext(
+ content::BrowserContext *context);
+
+ static ArcBridgeServiceFactory* GetInstance();
+
+ private:
+ friend struct base::DefaultSingletonTraits<ArcBridgeServiceFactory>;
+
+ ArcBridgeServiceFactory();
+ ~ArcBridgeServiceFactory() override;
+
+ // BrowserContextKeyedServiceFactory:
+ KeyedService* BuildServiceInstanceFor(
+ content::BrowserContext* profile) const override;
+ bool ServiceIsCreatedWithBrowserContext() const override;
+};
+
+} // namespace arc
+
+#endif // COMPONENTS_ARC_ARC_BRIDGE_SERVICE_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698