Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / volume_manager_factory.h
blob7255a516f669b1f7ac4cfa58b994c9519aad465d
1 // Copyright 2013 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.
5 #include "base/basictypes.h"
6 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
8 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_
9 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_
11 template<typename T> struct DefaultSingletonTraits;
13 namespace content {
14 class BrowserContext;
15 } // namespace content
17 namespace file_manager {
19 class VolumeManager;
21 // Factory to create VolumeManager.
22 class VolumeManagerFactory : public BrowserContextKeyedServiceFactory {
23 public:
24 // Returns VolumeManager instance.
25 static VolumeManager* Get(content::BrowserContext* context);
27 static VolumeManagerFactory* GetInstance();
29 protected:
30 // BrowserContextKeyedBaseFactory overrides:
31 content::BrowserContext* GetBrowserContextToUse(
32 content::BrowserContext* context) const override;
33 bool ServiceIsCreatedWithBrowserContext() const override;
34 bool ServiceIsNULLWhileTesting() const override;
36 // BrowserContextKeyedServiceFactory overrides:
37 KeyedService* BuildServiceInstanceFor(
38 content::BrowserContext* context) const override;
40 private:
41 // For Singleton.
42 friend struct DefaultSingletonTraits<VolumeManagerFactory>;
44 VolumeManagerFactory();
45 ~VolumeManagerFactory() override;
47 DISALLOW_COPY_AND_ASSIGN(VolumeManagerFactory);
50 } // namespace file_manager
52 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_