| 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 |
| 12 namespace base { |
| 11 class FilePath; | 13 class FilePath; |
| 12 namespace base { | |
| 13 class Time; | 14 class Time; |
| 14 } | 15 } |
| 15 | 16 |
| 16 namespace extensions { | 17 namespace extensions { |
| 17 | 18 |
| 18 // Test ExtensionSystem, for use with TestingProfile. | 19 // Test ExtensionSystem, for use with TestingProfile. |
| 19 class TestExtensionSystem : public ExtensionSystem { | 20 class TestExtensionSystem : public ExtensionSystem { |
| 20 public: | 21 public: |
| 21 explicit TestExtensionSystem(Profile* profile); | 22 explicit TestExtensionSystem(Profile* profile); |
| 22 virtual ~TestExtensionSystem(); | 23 virtual ~TestExtensionSystem(); |
| 23 | 24 |
| 24 // ProfileKeyedService implementation. | 25 // ProfileKeyedService implementation. |
| 25 virtual void Shutdown() OVERRIDE; | 26 virtual void Shutdown() OVERRIDE; |
| 26 | 27 |
| 27 // Creates an ExtensionService initialized with the testing profile and | 28 // Creates an ExtensionService initialized with the testing profile and |
| 28 // returns it. | 29 // returns it. |
| 29 ExtensionService* CreateExtensionService(const CommandLine* command_line, | 30 ExtensionService* CreateExtensionService(const CommandLine* command_line, |
| 30 const FilePath& install_directory, | 31 const base::FilePath& install_directo
ry, |
| 31 bool autoupdate_enabled); | 32 bool autoupdate_enabled); |
| 32 | 33 |
| 33 // Creates an ExtensionProcessManager. If not invoked, the | 34 // Creates an ExtensionProcessManager. If not invoked, the |
| 34 // ExtensionProcessManager is NULL. | 35 // ExtensionProcessManager is NULL. |
| 35 void CreateExtensionProcessManager(); | 36 void CreateExtensionProcessManager(); |
| 36 | 37 |
| 37 // Creates an AlarmManager. Will be NULL otherwise. | 38 // Creates an AlarmManager. Will be NULL otherwise. |
| 38 void CreateAlarmManager(base::Time (*now)()); | 39 void CreateAlarmManager(base::Time (*now)()); |
| 39 | 40 |
| 40 void CreateSocketManager(); | 41 void CreateSocketManager(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 scoped_ptr<ExtensionService> extension_service_; | 84 scoped_ptr<ExtensionService> extension_service_; |
| 84 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 85 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
| 85 scoped_ptr<AlarmManager> alarm_manager_; | 86 scoped_ptr<AlarmManager> alarm_manager_; |
| 86 scoped_refptr<ExtensionInfoMap> info_map_; | 87 scoped_refptr<ExtensionInfoMap> info_map_; |
| 87 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; | 88 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; |
| 88 }; | 89 }; |
| 89 | 90 |
| 90 } // namespace extensions | 91 } // namespace extensions |
| 91 | 92 |
| 92 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ | 93 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ |
| OLD | NEW |