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

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

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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"
(...skipping 15 matching lines...) Expand all
26 class DeclarativeUserScriptMaster; 26 class DeclarativeUserScriptMaster;
27 class ExtensionPrefs; 27 class ExtensionPrefs;
28 class RuntimeData; 28 class RuntimeData;
29 class SharedUserScriptMaster; 29 class SharedUserScriptMaster;
30 class StandardManagementPolicyProvider; 30 class StandardManagementPolicyProvider;
31 31
32 // Test ExtensionSystem, for use with TestingProfile. 32 // Test ExtensionSystem, for use with TestingProfile.
33 class TestExtensionSystem : public ExtensionSystem { 33 class TestExtensionSystem : public ExtensionSystem {
34 public: 34 public:
35 explicit TestExtensionSystem(Profile* profile); 35 explicit TestExtensionSystem(Profile* profile);
36 virtual ~TestExtensionSystem(); 36 ~TestExtensionSystem() override;
37 37
38 // KeyedService implementation. 38 // KeyedService implementation.
39 virtual void Shutdown() override; 39 void Shutdown() override;
40 40
41 // Creates an ExtensionPrefs with the testing profile and returns it. 41 // Creates an ExtensionPrefs with the testing profile and returns it.
42 // Useful for tests that need to modify prefs before creating the 42 // Useful for tests that need to modify prefs before creating the
43 // ExtensionService. 43 // ExtensionService.
44 ExtensionPrefs* CreateExtensionPrefs(const base::CommandLine* command_line, 44 ExtensionPrefs* CreateExtensionPrefs(const base::CommandLine* command_line,
45 const base::FilePath& install_directory); 45 const base::FilePath& install_directory);
46 46
47 // Creates an ExtensionService initialized with the testing profile and 47 // Creates an ExtensionService initialized with the testing profile and
48 // returns it, and creates ExtensionPrefs if it hasn't been created yet. 48 // returns it, and creates ExtensionPrefs if it hasn't been created yet.
49 ExtensionService* CreateExtensionService( 49 ExtensionService* CreateExtensionService(
50 const base::CommandLine* command_line, 50 const base::CommandLine* command_line,
51 const base::FilePath& install_directory, 51 const base::FilePath& install_directory,
52 bool autoupdate_enabled); 52 bool autoupdate_enabled);
53 53
54 // Creates a ProcessManager. If not invoked, the ProcessManager is NULL. 54 // Creates a ProcessManager. If not invoked, the ProcessManager is NULL.
55 void CreateProcessManager(); 55 void CreateProcessManager();
56 56
57 // Allows the ProcessManager to be overriden, for example by a stub 57 // Allows the ProcessManager to be overriden, for example by a stub
58 // implementation. Takes ownership of |manager|. 58 // implementation. Takes ownership of |manager|.
59 void SetProcessManager(ProcessManager* manager); 59 void SetProcessManager(ProcessManager* manager);
60 60
61 void CreateSocketManager(); 61 void CreateSocketManager();
62 62
63 virtual void InitForRegularProfile(bool extensions_enabled) override {} 63 void InitForRegularProfile(bool extensions_enabled) override {}
64 void SetExtensionService(ExtensionService* service); 64 void SetExtensionService(ExtensionService* service);
65 virtual ExtensionService* extension_service() override; 65 ExtensionService* extension_service() override;
66 virtual RuntimeData* runtime_data() override; 66 RuntimeData* runtime_data() override;
67 virtual ManagementPolicy* management_policy() override; 67 ManagementPolicy* management_policy() override;
68 virtual SharedUserScriptMaster* shared_user_script_master() override; 68 SharedUserScriptMaster* shared_user_script_master() override;
69 virtual ProcessManager* process_manager() override; 69 ProcessManager* process_manager() override;
70 virtual StateStore* state_store() override; 70 StateStore* state_store() override;
71 virtual StateStore* rules_store() override; 71 StateStore* rules_store() override;
72 TestingValueStore* value_store() { return value_store_; } 72 TestingValueStore* value_store() { return value_store_; }
73 virtual InfoMap* info_map() override; 73 InfoMap* info_map() override;
74 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() override; 74 LazyBackgroundTaskQueue* lazy_background_task_queue() override;
75 void SetEventRouter(scoped_ptr<EventRouter> event_router); 75 void SetEventRouter(scoped_ptr<EventRouter> event_router);
76 virtual EventRouter* event_router() override; 76 EventRouter* event_router() override;
77 virtual WarningService* warning_service() override; 77 WarningService* warning_service() override;
78 virtual Blacklist* blacklist() override; 78 Blacklist* blacklist() override;
79 virtual ErrorConsole* error_console() override; 79 ErrorConsole* error_console() override;
80 virtual InstallVerifier* install_verifier() override; 80 InstallVerifier* install_verifier() override;
81 virtual QuotaService* quota_service() override; 81 QuotaService* quota_service() override;
82 virtual const OneShotEvent& ready() const override; 82 const OneShotEvent& ready() const override;
83 virtual ContentVerifier* content_verifier() override; 83 ContentVerifier* content_verifier() override;
84 virtual scoped_ptr<ExtensionSet> GetDependentExtensions( 84 scoped_ptr<ExtensionSet> GetDependentExtensions(
85 const Extension* extension) override; 85 const Extension* extension) override;
86 virtual DeclarativeUserScriptMaster* 86 DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByExtension(
87 GetDeclarativeUserScriptMasterByExtension( 87 const ExtensionId& extension_id) override;
88 const ExtensionId& extension_id) override;
89 88
90 // Note that you probably want to use base::RunLoop().RunUntilIdle() right 89 // Note that you probably want to use base::RunLoop().RunUntilIdle() right
91 // after this to run all the accumulated tasks. 90 // after this to run all the accumulated tasks.
92 void SetReady() { ready_.Signal(); } 91 void SetReady() { ready_.Signal(); }
93 92
94 // Factory method for tests to use with SetTestingProfile. 93 // Factory method for tests to use with SetTestingProfile.
95 static KeyedService* Build(content::BrowserContext* profile); 94 static KeyedService* Build(content::BrowserContext* profile);
96 95
97 protected: 96 protected:
98 Profile* profile_; 97 Profile* profile_;
(...skipping 12 matching lines...) Expand all
111 scoped_ptr<EventRouter> event_router_; 110 scoped_ptr<EventRouter> event_router_;
112 scoped_ptr<ErrorConsole> error_console_; 111 scoped_ptr<ErrorConsole> error_console_;
113 scoped_ptr<InstallVerifier> install_verifier_; 112 scoped_ptr<InstallVerifier> install_verifier_;
114 scoped_ptr<QuotaService> quota_service_; 113 scoped_ptr<QuotaService> quota_service_;
115 OneShotEvent ready_; 114 OneShotEvent ready_;
116 }; 115 };
117 116
118 } // namespace extensions 117 } // namespace extensions
119 118
120 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 119 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_service.h ('k') | chrome/browser/extensions/theme_installed_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698