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

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

Issue 111253003: Remove DeferBackgroundExtensionCreation field trial and supporting code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extension_system.h header still needed for GetDisabledPlatformApp Created 7 years 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 | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/extensions/extension_system.h" 5 #include "chrome/browser/extensions/extension_system.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 } 331 }
332 332
333 ExtensionSystemImpl::~ExtensionSystemImpl() { 333 ExtensionSystemImpl::~ExtensionSystemImpl() {
334 } 334 }
335 335
336 void ExtensionSystemImpl::Shutdown() { 336 void ExtensionSystemImpl::Shutdown() {
337 process_manager_.reset(); 337 process_manager_.reset();
338 } 338 }
339 339
340 void ExtensionSystemImpl::InitForRegularProfile( 340 void ExtensionSystemImpl::InitForRegularProfile(bool extensions_enabled) {
341 bool extensions_enabled,
342 bool defer_background_creation) {
343 DCHECK(!profile_->IsOffTheRecord()); 341 DCHECK(!profile_->IsOffTheRecord());
344 if (user_script_master() || extension_service()) 342 if (user_script_master() || extension_service())
345 return; // Already initialized. 343 return; // Already initialized.
346 344
347 // The InfoMap needs to be created before the ProcessManager. 345 // The InfoMap needs to be created before the ProcessManager.
348 shared_->info_map(); 346 shared_->info_map();
349 347
350 process_manager_.reset(ProcessManager::Create(profile_)); 348 process_manager_.reset(ProcessManager::Create(profile_));
351 349
352 process_manager_->DeferBackgroundHostCreation(
353 defer_background_creation);
354
355 shared_->Init(extensions_enabled); 350 shared_->Init(extensions_enabled);
356 } 351 }
357 352
358 ExtensionService* ExtensionSystemImpl::extension_service() { 353 ExtensionService* ExtensionSystemImpl::extension_service() {
359 return shared_->extension_service(); 354 return shared_->extension_service();
360 } 355 }
361 356
362 ManagementPolicy* ExtensionSystemImpl::management_policy() { 357 ManagementPolicy* ExtensionSystemImpl::management_policy() {
363 return shared_->management_policy(); 358 return shared_->management_policy();
364 } 359 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( 436 void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts(
442 const std::string& extension_id, 437 const std::string& extension_id,
443 const UnloadedExtensionInfo::Reason reason) { 438 const UnloadedExtensionInfo::Reason reason) {
444 BrowserThread::PostTask( 439 BrowserThread::PostTask(
445 BrowserThread::IO, 440 BrowserThread::IO,
446 FROM_HERE, 441 FROM_HERE,
447 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); 442 base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason));
448 } 443 }
449 444
450 } // namespace extensions 445 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_system.h ('k') | chrome/browser/extensions/test_extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698