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

Unified Diff: chrome/browser/chromeos/file_system_provider/file_system_plugin/plugin_service_factory.h

Issue 1093383002: [WIP] Provided file system from NACL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved several modules to chromeos folder. Created 5 years, 5 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: 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

Powered by Google App Engine
This is Rietveld 408576698