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

Unified Diff: chrome/browser/ui/app_list/app_list_syncable_service_factory.cc

Issue 77773002: Ensure the ExtensionSystem is ready before initializing an ExtensionAppModelBuilder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: System -> Service Created 7 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/ui/app_list/app_list_syncable_service_factory.cc
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
index 6799a9f8d7cfd295aac98df449c8ea787524779b..616bd0cfc1801f3bd045b675e4b7ab70c68840ad 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/extensions/extension_system_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
@@ -28,6 +30,7 @@ AppListSyncableServiceFactory::AppListSyncableServiceFactory()
: BrowserContextKeyedServiceFactory(
"AppListSyncableService",
BrowserContextDependencyManager::GetInstance()) {
+ DependsOn(extensions::ExtensionSystemFactory::GetInstance());
}
AppListSyncableServiceFactory::~AppListSyncableServiceFactory() {
@@ -35,8 +38,11 @@ AppListSyncableServiceFactory::~AppListSyncableServiceFactory() {
BrowserContextKeyedService*
AppListSyncableServiceFactory::BuildServiceInstanceFor(
- content::BrowserContext* profile) const {
- return new AppListSyncableService(static_cast<Profile*>(profile));
+ content::BrowserContext* browser_context) const {
+ Profile* profile = static_cast<Profile*>(browser_context);
+ ExtensionService* extension_service =
+ extensions::ExtensionSystem::Get(profile)->extension_service();
+ return new AppListSyncableService(profile, extension_service);
}
void AppListSyncableServiceFactory::RegisterProfilePrefs(

Powered by Google App Engine
This is Rietveld 408576698