| 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 #include "chrome/browser/extensions/extension_service_test_base.h" | 5 #include "chrome/browser/extensions/extension_service_test_base.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 data_dir_.AppendASCII("good").AppendASCII("Extensions"); | 160 data_dir_.AppendASCII("good").AppendASCII("Extensions"); |
| 161 base::FilePath pref_path = | 161 base::FilePath pref_path = |
| 162 source_install_dir.DirName().Append(chrome::kPreferencesFilename); | 162 source_install_dir.DirName().Append(chrome::kPreferencesFilename); |
| 163 InitializeInstalledExtensionService(pref_path, source_install_dir); | 163 InitializeInstalledExtensionService(pref_path, source_install_dir); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void ExtensionServiceTestBase::InitializeExtensionServiceWithUpdater() { | 166 void ExtensionServiceTestBase::InitializeExtensionServiceWithUpdater() { |
| 167 ExtensionServiceInitParams params = CreateDefaultInitParams(); | 167 ExtensionServiceInitParams params = CreateDefaultInitParams(); |
| 168 params.autoupdate_enabled = true; | 168 params.autoupdate_enabled = true; |
| 169 InitializeExtensionService(params); | 169 InitializeExtensionService(params); |
| 170 // TODO(thestig): Remove this once we disable all tests that use |
| 171 // ExtensionServiceTestBase. |
| 172 #if defined(ENABLE_EXTENSIONS) |
| 170 service_->updater()->Start(); | 173 service_->updater()->Start(); |
| 174 #endif |
| 171 } | 175 } |
| 172 | 176 |
| 173 void ExtensionServiceTestBase::InitializeProcessManager() { | 177 void ExtensionServiceTestBase::InitializeProcessManager() { |
| 174 static_cast<extensions::TestExtensionSystem*>( | 178 static_cast<extensions::TestExtensionSystem*>( |
| 175 ExtensionSystem::Get(profile_.get()))->CreateProcessManager(); | 179 ExtensionSystem::Get(profile_.get()))->CreateProcessManager(); |
| 176 } | 180 } |
| 177 | 181 |
| 178 void ExtensionServiceTestBase::SetUp() { | 182 void ExtensionServiceTestBase::SetUp() { |
| 179 ExtensionErrorReporter::GetInstance()->ClearErrors(); | 183 ExtensionErrorReporter::GetInstance()->ClearErrors(); |
| 180 } | 184 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // interfere with the tests. Those tests that need an external provider | 225 // interfere with the tests. Those tests that need an external provider |
| 222 // will register one specifically. | 226 // will register one specifically. |
| 223 service_->ClearProvidersForTesting(); | 227 service_->ClearProvidersForTesting(); |
| 224 | 228 |
| 225 #if defined(OS_CHROMEOS) | 229 #if defined(OS_CHROMEOS) |
| 226 InstallLimiter::Get(profile_.get())->DisableForTest(); | 230 InstallLimiter::Get(profile_.get())->DisableForTest(); |
| 227 #endif | 231 #endif |
| 228 } | 232 } |
| 229 | 233 |
| 230 } // namespace extensions | 234 } // namespace extensions |
| OLD | NEW |