Index: chrome/browser/chromeos/file_system_provider/file_system_plugin/plugin_service_factory.h |
diff --git a/chrome/browser/chromeos/file_system_provider/file_system_plugin/plugin_service_factory.h b/chrome/browser/chromeos/file_system_provider/file_system_plugin/plugin_service_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7a433a4e451287fef008c457571e273ae12bbacc |
--- /dev/null |
+++ b/chrome/browser/chromeos/file_system_provider/file_system_plugin/plugin_service_factory.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PLUGIN_SERVICE_FACTORY_H |
+#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PLUGIN_SERVICE_FACTORY_H |
+ |
+#include <map> |
+#include <string> |
+ |
+#include "base/memory/singleton.h" |
+#include "components/keyed_service/content/browser_context_keyed_service_factory.h" |
+#include "content/public/browser/browser_context.h" |
+ |
+namespace chromeos { |
+namespace file_system_provider { |
+ |
+class PluginService; |
+ |
+// Creates plugin services per profile. |
+class PluginServiceFactory : public BrowserContextKeyedServiceFactory { |
+ public: |
+ // Returns a service instance singleton, after creating it, if necessary. |
+ static PluginService* Get(content::BrowserContext* context); |
+ // Gets a singleton instance of the factory |
+ static PluginServiceFactory* GetInstance(); |
+ private: |
+ friend struct DefaultSingletonTraits<PluginServiceFactory>; |
+ PluginServiceFactory(); |
+ ~PluginServiceFactory() override; |
+ // BrowserContextKeyedServiceFactory overrides: |
+ KeyedService* BuildServiceInstanceFor( |
+ content::BrowserContext* profile) const override; |
+ bool ServiceIsCreatedWithBrowserContext() const override; |
+ content::BrowserContext* GetBrowserContextToUse( |
+ content::BrowserContext* context) const override; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(PluginServiceFactory); |
+}; |
+ |
+} // namespace file_system_provider |
+} // namespace chromeos |
+#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PLUGIN_SERVICE_FACTORY_H |