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

Side by Side Diff: chrome/browser/ui/app_list/app_list_controller_delegate.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 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/ui/app_list/app_list_controller_delegate.h" 5 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/extensions/install_tracker_factory.h" 9 #include "chrome/browser/extensions/install_tracker_factory.h"
10 #include "chrome/browser/extensions/management_policy.h" 10 #include "chrome/browser/extensions/management_policy.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 Profile* profile) { 154 Profile* profile) {
155 if (extensions::ExtensionSystem::Get(profile)->extension_service()) 155 if (extensions::ExtensionSystem::Get(profile)->extension_service())
156 return extensions::InstallTrackerFactory::GetForProfile(profile); 156 return extensions::InstallTrackerFactory::GetForProfile(profile);
157 return NULL; 157 return NULL;
158 } 158 }
159 159
160 void AppListControllerDelegate::GetApps(Profile* profile, 160 void AppListControllerDelegate::GetApps(Profile* profile,
161 ExtensionSet* out_apps) { 161 ExtensionSet* out_apps) {
162 ExtensionService* service = 162 ExtensionService* service =
163 extensions::ExtensionSystem::Get(profile)->extension_service(); 163 extensions::ExtensionSystem::Get(profile)->extension_service();
164 if (!service) 164 DCHECK(service);
165 return;
166 out_apps->InsertAll(*service->extensions()); 165 out_apps->InsertAll(*service->extensions());
167 out_apps->InsertAll(*service->disabled_extensions()); 166 out_apps->InsertAll(*service->disabled_extensions());
168 out_apps->InsertAll(*service->terminated_extensions()); 167 out_apps->InsertAll(*service->terminated_extensions());
169 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/ui/app_list/app_list_syncable_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698