Chromium Code Reviews| 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 | 11 |
| 12 namespace base { | 12 namespace base { |
| 13 class Clock; | |
| 14 class FilePath; | 13 class FilePath; |
| 15 class Time; | 14 class Time; |
| 16 } | 15 } |
| 17 | 16 |
| 18 namespace extensions { | 17 namespace extensions { |
| 19 | 18 |
| 20 // Test ExtensionSystem, for use with TestingProfile. | 19 // Test ExtensionSystem, for use with TestingProfile. |
| 21 class TestExtensionSystem : public ExtensionSystem { | 20 class TestExtensionSystem : public ExtensionSystem { |
| 22 public: | 21 public: |
| 23 explicit TestExtensionSystem(Profile* profile); | 22 explicit TestExtensionSystem(Profile* profile); |
| 24 virtual ~TestExtensionSystem(); | 23 virtual ~TestExtensionSystem(); |
| 25 | 24 |
| 26 // ProfileKeyedService implementation. | 25 // ProfileKeyedService implementation. |
| 27 virtual void Shutdown() OVERRIDE; | 26 virtual void Shutdown() OVERRIDE; |
| 28 | 27 |
| 29 // Creates an ExtensionService initialized with the testing profile and | 28 // Creates an ExtensionService initialized with the testing profile and |
| 30 // returns it. | 29 // returns it. |
| 31 ExtensionService* CreateExtensionService(const CommandLine* command_line, | 30 ExtensionService* CreateExtensionService(const CommandLine* command_line, |
| 32 const base::FilePath& install_directo ry, | 31 const base::FilePath& install_directo ry, |
|
Devlin
2013/04/17 01:30:59
Not your code, but please wrap this properly, sinc
Patrick Riordan
2013/04/17 03:40:39
Done.
| |
| 33 bool autoupdate_enabled); | 32 bool autoupdate_enabled); |
| 34 | 33 |
| 35 // Creates an ExtensionProcessManager. If not invoked, the | 34 // Creates an ExtensionProcessManager. If not invoked, the |
| 36 // ExtensionProcessManager is NULL. | 35 // ExtensionProcessManager is NULL. |
| 37 void CreateExtensionProcessManager(); | 36 void CreateExtensionProcessManager(); |
| 38 | 37 |
| 39 // Creates an AlarmManager. Will be NULL otherwise. | |
| 40 void CreateAlarmManager(base::Clock* clock); | |
| 41 | |
| 42 void CreateSocketManager(); | 38 void CreateSocketManager(); |
| 43 | 39 |
| 44 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE {} | 40 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE {} |
| 45 virtual void InitForOTRProfile() OVERRIDE {} | 41 virtual void InitForOTRProfile() OVERRIDE {} |
| 46 void SetExtensionService(ExtensionService* service); | 42 void SetExtensionService(ExtensionService* service); |
| 47 virtual ExtensionService* extension_service() OVERRIDE; | 43 virtual ExtensionService* extension_service() OVERRIDE; |
| 48 virtual ManagementPolicy* management_policy() OVERRIDE; | 44 virtual ManagementPolicy* management_policy() OVERRIDE; |
| 49 virtual UserScriptMaster* user_script_master() OVERRIDE; | 45 virtual UserScriptMaster* user_script_master() OVERRIDE; |
| 50 virtual ExtensionProcessManager* process_manager() OVERRIDE; | 46 virtual ExtensionProcessManager* process_manager() OVERRIDE; |
| 51 virtual AlarmManager* alarm_manager() OVERRIDE; | 47 virtual AlarmManager* alarm_manager() OVERRIDE; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 scoped_ptr<ExtensionService> extension_service_; | 81 scoped_ptr<ExtensionService> extension_service_; |
| 86 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 82 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
| 87 scoped_ptr<AlarmManager> alarm_manager_; | 83 scoped_ptr<AlarmManager> alarm_manager_; |
| 88 scoped_refptr<ExtensionInfoMap> info_map_; | 84 scoped_refptr<ExtensionInfoMap> info_map_; |
| 89 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; | 85 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; |
| 90 }; | 86 }; |
| 91 | 87 |
| 92 } // namespace extensions | 88 } // namespace extensions |
| 93 | 89 |
| 94 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ | 90 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ |
| OLD | NEW |