OLD | NEW |
(Empty) | |
| 1 // Copyright 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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PLUGIN_SERVICE_FACTORY_H |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PLUGIN_SERVICE_FACTORY_H |
| 7 |
| 8 #include <map> |
| 9 #include <string> |
| 10 |
| 11 #include "base/memory/singleton.h" |
| 12 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 13 #include "content/public/browser/browser_context.h" |
| 14 |
| 15 namespace chromeos { |
| 16 namespace file_system_provider { |
| 17 |
| 18 class PluginService; |
| 19 |
| 20 // Creates plugin services per profile. |
| 21 class PluginServiceFactory : public BrowserContextKeyedServiceFactory { |
| 22 public: |
| 23 // Returns a service instance singleton, after creating it, if necessary. |
| 24 static PluginService* Get(content::BrowserContext* context); |
| 25 // Gets a singleton instance of the factory |
| 26 static PluginServiceFactory* GetInstance(); |
| 27 private: |
| 28 friend struct DefaultSingletonTraits<PluginServiceFactory>; |
| 29 PluginServiceFactory(); |
| 30 ~PluginServiceFactory() override; |
| 31 // BrowserContextKeyedServiceFactory overrides: |
| 32 KeyedService* BuildServiceInstanceFor( |
| 33 content::BrowserContext* profile) const override; |
| 34 bool ServiceIsCreatedWithBrowserContext() const override; |
| 35 content::BrowserContext* GetBrowserContextToUse( |
| 36 content::BrowserContext* context) const override; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(PluginServiceFactory); |
| 39 }; |
| 40 |
| 41 } // namespace file_system_provider |
| 42 } // namespace chromeos |
| 43 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PLUGIN_SERVICE_FACTORY_H |
OLD | NEW |