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 #if defined(OS_CHROMEOS) | 10 #if defined(OS_CHROMEOS) |
11 #include "chrome/browser/chromeos/settings/cros_settings.h" | 11 #include "chrome/browser/chromeos/settings/cros_settings.h" |
12 #endif | 12 #endif |
13 | 13 |
14 class CommandLine; | 14 class CommandLine; |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class Clock; | 17 class Clock; |
18 class FilePath; | 18 class FilePath; |
19 class Time; | 19 class Time; |
20 } | 20 } |
21 | 21 |
22 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
23 namespace chromeos { | 23 namespace chromeos { |
24 class ScopedTestUserManager; | 24 class ScopedTestUserManager; |
25 } | 25 } |
26 #endif | 26 #endif |
27 | 27 |
| 28 namespace content { |
| 29 class BrowserContext; |
| 30 } |
| 31 |
28 namespace extensions { | 32 namespace extensions { |
29 | 33 |
30 // Test ExtensionSystem, for use with TestingProfile. | 34 // Test ExtensionSystem, for use with TestingProfile. |
31 class TestExtensionSystem : public ExtensionSystem { | 35 class TestExtensionSystem : public ExtensionSystem { |
32 public: | 36 public: |
33 explicit TestExtensionSystem(Profile* profile); | 37 explicit TestExtensionSystem(Profile* profile); |
34 virtual ~TestExtensionSystem(); | 38 virtual ~TestExtensionSystem(); |
35 | 39 |
36 // ProfileKeyedService implementation. | 40 // ProfileKeyedService implementation. |
37 virtual void Shutdown() OVERRIDE; | 41 virtual void Shutdown() OVERRIDE; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual RulesRegistryService* rules_registry_service() OVERRIDE; | 75 virtual RulesRegistryService* rules_registry_service() OVERRIDE; |
72 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() | 76 virtual ApiResourceManager<SerialConnection>* serial_connection_manager() |
73 OVERRIDE; | 77 OVERRIDE; |
74 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; | 78 virtual ApiResourceManager<Socket>* socket_manager() OVERRIDE; |
75 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager() | 79 virtual ApiResourceManager<UsbDeviceResource>* usb_device_resource_manager() |
76 OVERRIDE; | 80 OVERRIDE; |
77 virtual ExtensionWarningService* warning_service() OVERRIDE; | 81 virtual ExtensionWarningService* warning_service() OVERRIDE; |
78 virtual Blacklist* blacklist() OVERRIDE; | 82 virtual Blacklist* blacklist() OVERRIDE; |
79 | 83 |
80 // Factory method for tests to use with SetTestingProfile. | 84 // Factory method for tests to use with SetTestingProfile. |
81 static ProfileKeyedService* Build(Profile* profile); | 85 static ProfileKeyedService* Build(content::BrowserContext* profile); |
82 | 86 |
83 protected: | 87 protected: |
84 Profile* profile_; | 88 Profile* profile_; |
85 | 89 |
86 private: | 90 private: |
87 #if defined(OS_CHROMEOS) | 91 #if defined(OS_CHROMEOS) |
88 // Required to instantiate TestExtensionSystem itself. | 92 // Required to instantiate TestExtensionSystem itself. |
89 chromeos::ScopedTestCrosSettings test_cros_settings_; | 93 chromeos::ScopedTestCrosSettings test_cros_settings_; |
90 // Required to instantiate an ExtensionService. | 94 // Required to instantiate an ExtensionService. |
91 scoped_ptr<chromeos::ScopedTestUserManager> test_user_manager_; | 95 scoped_ptr<chromeos::ScopedTestUserManager> test_user_manager_; |
(...skipping 12 matching lines...) Expand all Loading... |
104 scoped_ptr<ExtensionProcessManager> extension_process_manager_; | 108 scoped_ptr<ExtensionProcessManager> extension_process_manager_; |
105 scoped_ptr<AlarmManager> alarm_manager_; | 109 scoped_ptr<AlarmManager> alarm_manager_; |
106 scoped_refptr<LocationManager> location_manager_; | 110 scoped_refptr<LocationManager> location_manager_; |
107 scoped_refptr<ExtensionInfoMap> info_map_; | 111 scoped_refptr<ExtensionInfoMap> info_map_; |
108 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; | 112 scoped_ptr<ApiResourceManager<Socket> > socket_manager_; |
109 }; | 113 }; |
110 | 114 |
111 } // namespace extensions | 115 } // namespace extensions |
112 | 116 |
113 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ | 117 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ |
OLD | NEW |