OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 6 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
7 | 7 |
8 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_ | 8 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_ |
9 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_ | 9 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_ |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class VolumeManagerFactory : public BrowserContextKeyedServiceFactory { | 22 class VolumeManagerFactory : public BrowserContextKeyedServiceFactory { |
23 public: | 23 public: |
24 // Returns VolumeManager instance. | 24 // Returns VolumeManager instance. |
25 static VolumeManager* Get(content::BrowserContext* context); | 25 static VolumeManager* Get(content::BrowserContext* context); |
26 | 26 |
27 static VolumeManagerFactory* GetInstance(); | 27 static VolumeManagerFactory* GetInstance(); |
28 | 28 |
29 protected: | 29 protected: |
30 // BrowserContextKeyedBaseFactory overrides: | 30 // BrowserContextKeyedBaseFactory overrides: |
31 virtual content::BrowserContext* GetBrowserContextToUse( | 31 virtual content::BrowserContext* GetBrowserContextToUse( |
32 content::BrowserContext* context) const OVERRIDE; | 32 content::BrowserContext* context) const override; |
33 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; | 33 virtual bool ServiceIsCreatedWithBrowserContext() const override; |
34 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | 34 virtual bool ServiceIsNULLWhileTesting() const override; |
35 | 35 |
36 // BrowserContextKeyedServiceFactory overrides: | 36 // BrowserContextKeyedServiceFactory overrides: |
37 virtual KeyedService* BuildServiceInstanceFor( | 37 virtual KeyedService* BuildServiceInstanceFor( |
38 content::BrowserContext* context) const OVERRIDE; | 38 content::BrowserContext* context) const override; |
39 | 39 |
40 private: | 40 private: |
41 // For Singleton. | 41 // For Singleton. |
42 friend struct DefaultSingletonTraits<VolumeManagerFactory>; | 42 friend struct DefaultSingletonTraits<VolumeManagerFactory>; |
43 | 43 |
44 VolumeManagerFactory(); | 44 VolumeManagerFactory(); |
45 virtual ~VolumeManagerFactory(); | 45 virtual ~VolumeManagerFactory(); |
46 | 46 |
47 DISALLOW_COPY_AND_ASSIGN(VolumeManagerFactory); | 47 DISALLOW_COPY_AND_ASSIGN(VolumeManagerFactory); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace file_manager | 50 } // namespace file_manager |
51 | 51 |
52 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_ | 52 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_VOLUME_MANAGER_FACTORY_H_ |
OLD | NEW |