Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Side by Side Diff: chrome/browser/extensions/extension_service_test_base.cc

Issue 671763002: Extract ProcessManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/files/file_util.h" 8 #include "base/files/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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 service_->updater()->Start(); 170 service_->updater()->Start();
171 } 171 }
172 172
173 void ExtensionServiceTestBase::InitializeProcessManager() {
174 static_cast<extensions::TestExtensionSystem*>(
175 ExtensionSystem::Get(profile_.get()))->CreateProcessManager();
176 }
177
178 void ExtensionServiceTestBase::SetUp() { 173 void ExtensionServiceTestBase::SetUp() {
179 ExtensionErrorReporter::GetInstance()->ClearErrors(); 174 ExtensionErrorReporter::GetInstance()->ClearErrors();
180 } 175 }
181 176
182 void ExtensionServiceTestBase::SetUpTestCase() { 177 void ExtensionServiceTestBase::SetUpTestCase() {
183 // Safe to call multiple times. 178 // Safe to call multiple times.
184 ExtensionErrorReporter::Init(false); // no noisy errors. 179 ExtensionErrorReporter::Init(false); // no noisy errors.
185 } 180 }
186 181
187 // These are declared in the .cc so that all inheritors don't need to know 182 // These are declared in the .cc so that all inheritors don't need to know
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // interfere with the tests. Those tests that need an external provider 216 // interfere with the tests. Those tests that need an external provider
222 // will register one specifically. 217 // will register one specifically.
223 service_->ClearProvidersForTesting(); 218 service_->ClearProvidersForTesting();
224 219
225 #if defined(OS_CHROMEOS) 220 #if defined(OS_CHROMEOS)
226 InstallLimiter::Get(profile_.get())->DisableForTest(); 221 InstallLimiter::Get(profile_.get())->DisableForTest();
227 #endif 222 #endif
228 } 223 }
229 224
230 } // namespace extensions 225 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_test_base.h ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698