| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 service_(NULL), | 84 service_(NULL), |
| 85 testing_local_state_(TestingBrowserProcess::GetGlobal()), | 85 testing_local_state_(TestingBrowserProcess::GetGlobal()), |
| 86 did_reset_thread_bundle_(false), | 86 did_reset_thread_bundle_(false), |
| 87 registry_(NULL) { | 87 registry_(NULL) { |
| 88 base::FilePath test_data_dir; | 88 base::FilePath test_data_dir; |
| 89 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { | 89 if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { |
| 90 ADD_FAILURE(); | 90 ADD_FAILURE(); |
| 91 return; | 91 return; |
| 92 } | 92 } |
| 93 data_dir_ = test_data_dir.AppendASCII("extensions"); | 93 data_dir_ = test_data_dir.AppendASCII("extensions"); |
| 94 base::CommandLine::ForCurrentProcess()->AppendSwitch("mojo-local-storage"); |
| 94 } | 95 } |
| 95 | 96 |
| 96 ExtensionServiceTestBase::~ExtensionServiceTestBase() { | 97 ExtensionServiceTestBase::~ExtensionServiceTestBase() { |
| 97 // Parts of destruction have to happen on an IO thread, so if the thread | 98 // Parts of destruction have to happen on an IO thread, so if the thread |
| 98 // bundle is reset, we need to change it back. | 99 // bundle is reset, we need to change it back. |
| 99 if (did_reset_thread_bundle_) | 100 if (did_reset_thread_bundle_) |
| 100 ResetThreadBundle(kThreadOptions); | 101 ResetThreadBundle(kThreadOptions); |
| 101 | 102 |
| 102 // Why? Because |profile_| has to be destroyed before |at_exit_manager_|, but | 103 // Why? Because |profile_| has to be destroyed before |at_exit_manager_|, but |
| 103 // is declared above it in the class definition since it's protected. | 104 // is declared above it in the class definition since it's protected. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 336 |
| 336 service_->RegisterInstallGate(ExtensionPrefs::DELAY_REASON_WAIT_FOR_IMPORTS, | 337 service_->RegisterInstallGate(ExtensionPrefs::DELAY_REASON_WAIT_FOR_IMPORTS, |
| 337 service_->shared_module_service()); | 338 service_->shared_module_service()); |
| 338 | 339 |
| 339 #if defined(OS_CHROMEOS) | 340 #if defined(OS_CHROMEOS) |
| 340 InstallLimiter::Get(profile_.get())->DisableForTest(); | 341 InstallLimiter::Get(profile_.get())->DisableForTest(); |
| 341 #endif | 342 #endif |
| 342 } | 343 } |
| 343 | 344 |
| 344 } // namespace extensions | 345 } // namespace extensions |
| OLD | NEW |