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

Unified Diff: chrome/browser/ui/ash/chrome_launcher_prefs.cc

Issue 2416133002: Implement local storage for App List in case app sync is off. (Closed)
Patch Set: method renamed Created 4 years, 2 months 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/ash/chrome_launcher_prefs.cc
diff --git a/chrome/browser/ui/ash/chrome_launcher_prefs.cc b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
index c57d1cd8a3d2c802bf3961c257972b8f822fc6ab..a7cbfb15a355d2b28f21110083420a2938278b0a 100644
--- a/chrome/browser/ui/ash/chrome_launcher_prefs.cc
+++ b/chrome/browser/ui/ash/chrome_launcher_prefs.cc
@@ -598,8 +598,8 @@ std::vector<AppLauncherId> GetPinnedAppsFromPrefs(
LauncherControllerHelper* helper) {
app_list::AppListSyncableService* app_service =
app_list::AppListSyncableServiceFactory::GetForProfile(helper->profile());
- // Some unit tests may not have it.
- if (!app_service)
+ // Some unit tests may not have it or service may not be initialized.
+ if (!app_service || !app_service->IsInitialized())
return std::vector<AppLauncherId>();
std::vector<PinInfo> pin_infos;

Powered by Google App Engine
This is Rietveld 408576698