Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/browser/extensions/test_extension_system.h

Issue 1127133006: Extract InstallVerifier from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 11
12 class Profile; 12 class Profile;
13 class TestingValueStore; 13 class TestingValueStore;
14 14
15 namespace base { 15 namespace base {
16 class CommandLine; 16 class CommandLine;
17 class FilePath; 17 class FilePath;
18 class Time; 18 class Time;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 class BrowserContext; 22 class BrowserContext;
23 } 23 }
24 24
25 namespace extensions { 25 namespace extensions {
26 class DeclarativeUserScriptManager; 26 class DeclarativeUserScriptManager;
27 class ExtensionPrefs; 27 class ExtensionPrefs;
28 class InstallVerifier;
28 class RuntimeData; 29 class RuntimeData;
29 class SharedUserScriptMaster; 30 class SharedUserScriptMaster;
30 class StandardManagementPolicyProvider; 31 class StandardManagementPolicyProvider;
31 32
32 // Test ExtensionSystem, for use with TestingProfile. 33 // Test ExtensionSystem, for use with TestingProfile.
33 class TestExtensionSystem : public ExtensionSystem { 34 class TestExtensionSystem : public ExtensionSystem {
34 public: 35 public:
35 explicit TestExtensionSystem(Profile* profile); 36 explicit TestExtensionSystem(Profile* profile);
36 ~TestExtensionSystem() override; 37 ~TestExtensionSystem() override;
37 38
(...skipping 26 matching lines...) Expand all
64 ManagementPolicy* management_policy() override; 65 ManagementPolicy* management_policy() override;
65 SharedUserScriptMaster* shared_user_script_master() override; 66 SharedUserScriptMaster* shared_user_script_master() override;
66 DeclarativeUserScriptManager* declarative_user_script_manager() override; 67 DeclarativeUserScriptManager* declarative_user_script_manager() override;
67 StateStore* state_store() override; 68 StateStore* state_store() override;
68 StateStore* rules_store() override; 69 StateStore* rules_store() override;
69 TestingValueStore* value_store() { return value_store_; } 70 TestingValueStore* value_store() { return value_store_; }
70 InfoMap* info_map() override; 71 InfoMap* info_map() override;
71 LazyBackgroundTaskQueue* lazy_background_task_queue() override; 72 LazyBackgroundTaskQueue* lazy_background_task_queue() override;
72 void SetEventRouter(scoped_ptr<EventRouter> event_router); 73 void SetEventRouter(scoped_ptr<EventRouter> event_router);
73 EventRouter* event_router() override; 74 EventRouter* event_router() override;
74 InstallVerifier* install_verifier() override;
75 QuotaService* quota_service() override; 75 QuotaService* quota_service() override;
76 const OneShotEvent& ready() const override; 76 const OneShotEvent& ready() const override;
77 ContentVerifier* content_verifier() override; 77 ContentVerifier* content_verifier() override;
78 scoped_ptr<ExtensionSet> GetDependentExtensions( 78 scoped_ptr<ExtensionSet> GetDependentExtensions(
79 const Extension* extension) override; 79 const Extension* extension) override;
80 80
81 // Note that you probably want to use base::RunLoop().RunUntilIdle() right 81 // Note that you probably want to use base::RunLoop().RunUntilIdle() right
82 // after this to run all the accumulated tasks. 82 // after this to run all the accumulated tasks.
83 void SetReady() { ready_.Signal(); } 83 void SetReady() { ready_.Signal(); }
84 84
85 // Factory method for tests to use with SetTestingProfile. 85 // Factory method for tests to use with SetTestingProfile.
86 static KeyedService* Build(content::BrowserContext* profile); 86 static KeyedService* Build(content::BrowserContext* profile);
87 87
88 protected: 88 protected:
89 Profile* profile_; 89 Profile* profile_;
90 90
91 private: 91 private:
92 scoped_ptr<StateStore> state_store_; 92 scoped_ptr<StateStore> state_store_;
93 // A pointer to the TestingValueStore owned by |state_store_|. 93 // A pointer to the TestingValueStore owned by |state_store_|.
94 TestingValueStore* value_store_; 94 TestingValueStore* value_store_;
95 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_; 95 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_;
96 scoped_ptr<ManagementPolicy> management_policy_; 96 scoped_ptr<ManagementPolicy> management_policy_;
97 scoped_ptr<RuntimeData> runtime_data_; 97 scoped_ptr<RuntimeData> runtime_data_;
98 scoped_ptr<ExtensionService> extension_service_; 98 scoped_ptr<ExtensionService> extension_service_;
99 scoped_refptr<InfoMap> info_map_; 99 scoped_refptr<InfoMap> info_map_;
100 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; 100 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_;
101 scoped_ptr<EventRouter> event_router_; 101 scoped_ptr<EventRouter> event_router_;
102 scoped_ptr<InstallVerifier> install_verifier_; 102 scoped_ptr<InstallVerifier> install_verifier_;
Reilly Grant (use Gerrit) 2015/05/18 18:26:30 Remove this line as well.
juncai 2015/05/18 20:10:49 Done.
103 scoped_ptr<QuotaService> quota_service_; 103 scoped_ptr<QuotaService> quota_service_;
104 OneShotEvent ready_; 104 OneShotEvent ready_;
105 }; 105 };
106 106
107 } // namespace extensions 107 } // namespace extensions
108 108
109 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 109 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/install_verifier_factory.cc ('k') | chrome/browser/extensions/test_extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698