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_TEST_EXTENSION_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/extension_system.h" | 8 #include "chrome/browser/extensions/extension_system.h" |
9 | 9 |
10 class CommandLine; | 10 class CommandLine; |
11 class TestingValueStore; | 11 class TestingValueStore; |
12 | 12 |
13 namespace base { | 13 namespace base { |
14 class FilePath; | 14 class FilePath; |
15 class Time; | 15 class Time; |
16 } | 16 } |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 class BrowserContext; | 19 class BrowserContext; |
20 } | 20 } |
21 | 21 |
22 namespace extensions { | 22 namespace extensions { |
23 class ExtensionPrefs; | 23 class ExtensionPrefs; |
| 24 class RuntimeData; |
24 | 25 |
25 // Test ExtensionSystem, for use with TestingProfile. | 26 // Test ExtensionSystem, for use with TestingProfile. |
26 class TestExtensionSystem : public ExtensionSystem { | 27 class TestExtensionSystem : public ExtensionSystem { |
27 public: | 28 public: |
28 explicit TestExtensionSystem(Profile* profile); | 29 explicit TestExtensionSystem(Profile* profile); |
29 virtual ~TestExtensionSystem(); | 30 virtual ~TestExtensionSystem(); |
30 | 31 |
31 // BrowserContextKeyedService implementation. | 32 // BrowserContextKeyedService implementation. |
32 virtual void Shutdown() OVERRIDE; | 33 virtual void Shutdown() OVERRIDE; |
33 | 34 |
(...skipping 15 matching lines...) Expand all Loading... |
49 | 50 |
50 // Allows the ProcessManager to be overriden, for example by a stub | 51 // Allows the ProcessManager to be overriden, for example by a stub |
51 // implementation. Takes ownership of |manager|. | 52 // implementation. Takes ownership of |manager|. |
52 void SetProcessManager(ProcessManager* manager); | 53 void SetProcessManager(ProcessManager* manager); |
53 | 54 |
54 void CreateSocketManager(); | 55 void CreateSocketManager(); |
55 | 56 |
56 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE {} | 57 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE {} |
57 void SetExtensionService(ExtensionService* service); | 58 void SetExtensionService(ExtensionService* service); |
58 virtual ExtensionService* extension_service() OVERRIDE; | 59 virtual ExtensionService* extension_service() OVERRIDE; |
| 60 virtual RuntimeData* runtime_data() OVERRIDE; |
59 virtual ManagementPolicy* management_policy() OVERRIDE; | 61 virtual ManagementPolicy* management_policy() OVERRIDE; |
60 virtual UserScriptMaster* user_script_master() OVERRIDE; | 62 virtual UserScriptMaster* user_script_master() OVERRIDE; |
61 virtual ProcessManager* process_manager() OVERRIDE; | 63 virtual ProcessManager* process_manager() OVERRIDE; |
62 virtual StateStore* state_store() OVERRIDE; | 64 virtual StateStore* state_store() OVERRIDE; |
63 virtual StateStore* rules_store() OVERRIDE; | 65 virtual StateStore* rules_store() OVERRIDE; |
64 TestingValueStore* value_store() { return value_store_; } | 66 TestingValueStore* value_store() { return value_store_; } |
65 virtual InfoMap* info_map() OVERRIDE; | 67 virtual InfoMap* info_map() OVERRIDE; |
66 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() OVERRIDE; | 68 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() OVERRIDE; |
67 virtual EventRouter* event_router() OVERRIDE; | 69 virtual EventRouter* event_router() OVERRIDE; |
68 virtual ExtensionWarningService* warning_service() OVERRIDE; | 70 virtual ExtensionWarningService* warning_service() OVERRIDE; |
(...skipping 14 matching lines...) Expand all Loading... |
83 Profile* profile_; | 85 Profile* profile_; |
84 | 86 |
85 private: | 87 private: |
86 scoped_ptr<StateStore> state_store_; | 88 scoped_ptr<StateStore> state_store_; |
87 // A pointer to the TestingValueStore owned by |state_store_|. | 89 // A pointer to the TestingValueStore owned by |state_store_|. |
88 TestingValueStore* value_store_; | 90 TestingValueStore* value_store_; |
89 scoped_ptr<Blacklist> blacklist_; | 91 scoped_ptr<Blacklist> blacklist_; |
90 scoped_ptr<StandardManagementPolicyProvider> | 92 scoped_ptr<StandardManagementPolicyProvider> |
91 standard_management_policy_provider_; | 93 standard_management_policy_provider_; |
92 scoped_ptr<ManagementPolicy> management_policy_; | 94 scoped_ptr<ManagementPolicy> management_policy_; |
| 95 scoped_ptr<RuntimeData> runtime_data_; |
93 scoped_ptr<ExtensionService> extension_service_; | 96 scoped_ptr<ExtensionService> extension_service_; |
94 scoped_ptr<ProcessManager> process_manager_; | 97 scoped_ptr<ProcessManager> process_manager_; |
95 scoped_refptr<InfoMap> info_map_; | 98 scoped_refptr<InfoMap> info_map_; |
96 scoped_ptr<ErrorConsole> error_console_; | 99 scoped_ptr<ErrorConsole> error_console_; |
97 scoped_ptr<InstallVerifier> install_verifier_; | 100 scoped_ptr<InstallVerifier> install_verifier_; |
98 OneShotEvent ready_; | 101 OneShotEvent ready_; |
99 }; | 102 }; |
100 | 103 |
101 } // namespace extensions | 104 } // namespace extensions |
102 | 105 |
103 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ | 106 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ |
OLD | NEW |