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_
13 struct DefaultSingletonTraits
;
18 } // namespace content
20 namespace file_manager
{
24 // Factory to create VolumeManager.
25 class VolumeManagerFactory
: public BrowserContextKeyedServiceFactory
{
27 // Returns VolumeManager instance.
28 static VolumeManager
* Get(content::BrowserContext
* context
);
30 static VolumeManagerFactory
* GetInstance();
33 // BrowserContextKeyedBaseFactory overrides:
34 content::BrowserContext
* GetBrowserContextToUse(
35 content::BrowserContext
* context
) const override
;
36 bool ServiceIsCreatedWithBrowserContext() const override
;
37 bool ServiceIsNULLWhileTesting() const override
;
39 // BrowserContextKeyedServiceFactory overrides:
40 KeyedService
* BuildServiceInstanceFor(
41 content::BrowserContext
* context
) const override
;
45 friend struct base::DefaultSingletonTraits
<VolumeManagerFactory
>;
47 VolumeManagerFactory();
48 ~VolumeManagerFactory() override
;
50 DISALLOW_COPY_AND_ASSIGN(VolumeManagerFactory
);
53 } // namespace file_manager
55 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_