OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
11 #include "chrome/browser/profiles/profile_keyed_service_factory.h" | 11 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
12 | 12 |
13 class ExtensionSystem; | |
14 class Profile; | 13 class Profile; |
15 class ProfileKeyedService; | 14 class ProfileKeyedService; |
16 | 15 |
| 16 namespace extensions { |
| 17 class ExtensionSystem; |
| 18 |
17 // ProfileKeyedServiceFactory for ExtensionSystemImpl::Shared. | 19 // ProfileKeyedServiceFactory for ExtensionSystemImpl::Shared. |
18 // Should not be used except by ExtensionSystem(Factory). | 20 // Should not be used except by ExtensionSystem(Factory). |
19 class ExtensionSystemSharedFactory : public ProfileKeyedServiceFactory { | 21 class ExtensionSystemSharedFactory : public ProfileKeyedServiceFactory { |
20 public: | 22 public: |
21 static ExtensionSystemImpl::Shared* GetForProfile(Profile* profile); | 23 static ExtensionSystemImpl::Shared* GetForProfile( |
| 24 Profile* profile); |
22 | 25 |
23 static ExtensionSystemSharedFactory* GetInstance(); | 26 static ExtensionSystemSharedFactory* GetInstance(); |
24 | 27 |
25 private: | 28 private: |
26 friend struct DefaultSingletonTraits<ExtensionSystemSharedFactory>; | 29 friend struct DefaultSingletonTraits<ExtensionSystemSharedFactory>; |
27 | 30 |
28 ExtensionSystemSharedFactory(); | 31 ExtensionSystemSharedFactory(); |
29 virtual ~ExtensionSystemSharedFactory(); | 32 virtual ~ExtensionSystemSharedFactory(); |
30 | 33 |
31 virtual ProfileKeyedService* BuildServiceInstanceFor( | 34 virtual ProfileKeyedService* BuildServiceInstanceFor( |
(...skipping 14 matching lines...) Expand all Loading... |
46 | 49 |
47 ExtensionSystemFactory(); | 50 ExtensionSystemFactory(); |
48 virtual ~ExtensionSystemFactory(); | 51 virtual ~ExtensionSystemFactory(); |
49 | 52 |
50 virtual ProfileKeyedService* BuildServiceInstanceFor( | 53 virtual ProfileKeyedService* BuildServiceInstanceFor( |
51 Profile* profile) const OVERRIDE; | 54 Profile* profile) const OVERRIDE; |
52 virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE; | 55 virtual bool ServiceHasOwnInstanceInIncognito() OVERRIDE; |
53 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; | 56 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; |
54 }; | 57 }; |
55 | 58 |
| 59 } // namespace extensions |
| 60 |
56 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ | 61 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_FACTORY_H_ |
OLD | NEW |