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

Unified Diff: chrome/browser/extensions/extension_system.cc

Issue 11359081: Lazy initialization for ProcessesEventRouter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_system.cc
diff --git a/chrome/browser/extensions/extension_system.cc b/chrome/browser/extensions/extension_system.cc
index cf5b5d451641efe65d414bd09684c4c30aefa38b..2168a13db186f5c949d3f287ff6609f0734363ff 100644
--- a/chrome/browser/extensions/extension_system.cc
+++ b/chrome/browser/extensions/extension_system.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/extensions/api/alarms/alarm_manager.h"
#include "chrome/browser/extensions/api/declarative/rules_registry_service.h"
#include "chrome/browser/extensions/api/messaging/message_service.h"
+#include "chrome/browser/extensions/api/processes/processes_api_service.h"
#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/extensions/event_router.h"
#include "chrome/browser/extensions/extension_devtools_manager.h"
@@ -71,6 +72,7 @@ ExtensionSystem* ExtensionSystem::Get(Profile* profile) {
ExtensionSystemImpl::Shared::Shared(Profile* profile)
: profile_(profile) {
+
}
ExtensionSystemImpl::Shared::~Shared() {
@@ -112,6 +114,11 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
user_script_master_ = new UserScriptMaster(profile_);
+ // Initialize services that register with the event router.
+ // TODO(yoz): crbug.com/159265: This shouldn't be here, because of dependency
+ // issues, but unfortunately extension startup ordering is complicated.
+ ProcessesAPIService::Get(profile_);
Yoyo Zhou 2012/11/07 03:25:19 This is the unfortunate part. The observers are r
Aaron Boodman 2012/11/07 04:08:20 Move EventRouter construction into ExtensionSystem
Yoyo Zhou 2012/11/07 22:53:36 This turned out to be the best solution. I had to
+
bool autoupdate_enabled = true;
#if defined(OS_CHROMEOS)
if (!extensions_enabled)
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/profiles/profile_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698