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 "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
9 #include "extensions/browser/extension_system.h" | 9 #include "extensions/browser/extension_system.h" |
10 #include "extensions/common/one_shot_event.h" | 10 #include "extensions/common/one_shot_event.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ManagementPolicy* management_policy() override; | 64 ManagementPolicy* management_policy() override; |
65 SharedUserScriptMaster* shared_user_script_master() override; | 65 SharedUserScriptMaster* shared_user_script_master() override; |
66 DeclarativeUserScriptManager* declarative_user_script_manager() override; | 66 DeclarativeUserScriptManager* declarative_user_script_manager() override; |
67 StateStore* state_store() override; | 67 StateStore* state_store() override; |
68 StateStore* rules_store() override; | 68 StateStore* rules_store() override; |
69 TestingValueStore* value_store() { return value_store_; } | 69 TestingValueStore* value_store() { return value_store_; } |
70 InfoMap* info_map() override; | 70 InfoMap* info_map() override; |
71 LazyBackgroundTaskQueue* lazy_background_task_queue() override; | 71 LazyBackgroundTaskQueue* lazy_background_task_queue() override; |
72 void SetEventRouter(scoped_ptr<EventRouter> event_router); | 72 void SetEventRouter(scoped_ptr<EventRouter> event_router); |
73 EventRouter* event_router() override; | 73 EventRouter* event_router() override; |
74 ErrorConsole* error_console() override; | |
75 InstallVerifier* install_verifier() override; | 74 InstallVerifier* install_verifier() override; |
76 QuotaService* quota_service() override; | 75 QuotaService* quota_service() override; |
77 const OneShotEvent& ready() const override; | 76 const OneShotEvent& ready() const override; |
78 ContentVerifier* content_verifier() override; | 77 ContentVerifier* content_verifier() override; |
79 scoped_ptr<ExtensionSet> GetDependentExtensions( | 78 scoped_ptr<ExtensionSet> GetDependentExtensions( |
80 const Extension* extension) override; | 79 const Extension* extension) override; |
81 | 80 |
82 // Note that you probably want to use base::RunLoop().RunUntilIdle() right | 81 // Note that you probably want to use base::RunLoop().RunUntilIdle() right |
83 // after this to run all the accumulated tasks. | 82 // after this to run all the accumulated tasks. |
84 void SetReady() { ready_.Signal(); } | 83 void SetReady() { ready_.Signal(); } |
85 | 84 |
86 // Factory method for tests to use with SetTestingProfile. | 85 // Factory method for tests to use with SetTestingProfile. |
87 static KeyedService* Build(content::BrowserContext* profile); | 86 static KeyedService* Build(content::BrowserContext* profile); |
88 | 87 |
89 protected: | 88 protected: |
90 Profile* profile_; | 89 Profile* profile_; |
91 | 90 |
92 private: | 91 private: |
93 scoped_ptr<StateStore> state_store_; | 92 scoped_ptr<StateStore> state_store_; |
94 // A pointer to the TestingValueStore owned by |state_store_|. | 93 // A pointer to the TestingValueStore owned by |state_store_|. |
95 TestingValueStore* value_store_; | 94 TestingValueStore* value_store_; |
96 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_; | 95 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_; |
97 scoped_ptr<ManagementPolicy> management_policy_; | 96 scoped_ptr<ManagementPolicy> management_policy_; |
98 scoped_ptr<RuntimeData> runtime_data_; | 97 scoped_ptr<RuntimeData> runtime_data_; |
99 scoped_ptr<ExtensionService> extension_service_; | 98 scoped_ptr<ExtensionService> extension_service_; |
100 scoped_refptr<InfoMap> info_map_; | 99 scoped_refptr<InfoMap> info_map_; |
101 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; | 100 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; |
102 scoped_ptr<EventRouter> event_router_; | 101 scoped_ptr<EventRouter> event_router_; |
103 scoped_ptr<ErrorConsole> error_console_; | |
104 scoped_ptr<InstallVerifier> install_verifier_; | 102 scoped_ptr<InstallVerifier> install_verifier_; |
105 scoped_ptr<QuotaService> quota_service_; | 103 scoped_ptr<QuotaService> quota_service_; |
106 OneShotEvent ready_; | 104 OneShotEvent ready_; |
107 }; | 105 }; |
108 | 106 |
109 } // namespace extensions | 107 } // namespace extensions |
110 | 108 |
111 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ | 109 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ |
OLD | NEW |