| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSION_SERVICE_TEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 void InitializeInstalledExtensionService( | 78 void InitializeInstalledExtensionService( |
| 79 const base::FilePath& prefs_file, | 79 const base::FilePath& prefs_file, |
| 80 const base::FilePath& source_install_dir); | 80 const base::FilePath& source_install_dir); |
| 81 | 81 |
| 82 // Initialize an ExtensionService with a few already-installed extensions. | 82 // Initialize an ExtensionService with a few already-installed extensions. |
| 83 void InitializeGoodInstalledExtensionService(); | 83 void InitializeGoodInstalledExtensionService(); |
| 84 | 84 |
| 85 // Initialize an ExtensionService with autoupdate enabled. | 85 // Initialize an ExtensionService with autoupdate enabled. |
| 86 void InitializeExtensionServiceWithUpdater(); | 86 void InitializeExtensionServiceWithUpdater(); |
| 87 | 87 |
| 88 // Initialize the associated ProcessManager. | |
| 89 void InitializeProcessManager(); | |
| 90 | |
| 91 // TODO(rdevlin.cronin): Pull out more methods from ExtensionServiceTest that | 88 // TODO(rdevlin.cronin): Pull out more methods from ExtensionServiceTest that |
| 92 // are commonly used and/or reimplemented. For instance, methods to install | 89 // are commonly used and/or reimplemented. For instance, methods to install |
| 93 // extensions from various locations, etc. | 90 // extensions from various locations, etc. |
| 94 | 91 |
| 95 content::BrowserContext* browser_context(); | 92 content::BrowserContext* browser_context(); |
| 96 Profile* profile(); | 93 Profile* profile(); |
| 97 ExtensionService* service() { return service_; } | 94 ExtensionService* service() { return service_; } |
| 98 ExtensionRegistry* registry() { return registry_; } | 95 ExtensionRegistry* registry() { return registry_; } |
| 99 const base::FilePath& extensions_install_dir() const { | 96 const base::FilePath& extensions_install_dir() const { |
| 100 return extensions_install_dir_; | 97 return extensions_install_dir_; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 #if defined OS_CHROMEOS | 136 #if defined OS_CHROMEOS |
| 140 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; | 137 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; |
| 141 chromeos::ScopedTestCrosSettings test_cros_settings_; | 138 chromeos::ScopedTestCrosSettings test_cros_settings_; |
| 142 chromeos::ScopedTestUserManager test_user_manager_; | 139 chromeos::ScopedTestUserManager test_user_manager_; |
| 143 #endif | 140 #endif |
| 144 }; | 141 }; |
| 145 | 142 |
| 146 } // namespace extensions | 143 } // namespace extensions |
| 147 | 144 |
| 148 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ | 145 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_TEST_BASE_H_ |
| OLD | NEW |