Index: chrome/browser/ui/app_list/app_list_syncable_service.cc |
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service.cc b/chrome/browser/ui/app_list/app_list_syncable_service.cc |
index 1288b42b6fdef3d86394066012008a67d59f3e85..e3a5e065843e6d4323805ba671c38d088fe10afe 100644 |
--- a/chrome/browser/ui/app_list/app_list_syncable_service.cc |
+++ b/chrome/browser/ui/app_list/app_list_syncable_service.cc |
@@ -121,7 +121,10 @@ void AppListSyncableService::BuildModel() { |
if (service) |
controller = service->GetControllerDelegate(); |
apps_builder_.reset(new ExtensionAppModelBuilder(controller)); |
- if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ DCHECK(profile_); |
+ // TODO(stevenjb): Correctly handle OTR profiles for Guest mode. |
+ if (!profile_->IsOffTheRecord() && |
+ CommandLine::ForCurrentProcess()->HasSwitch( |
switches::kEnableSyncAppList)) { |
DVLOG(1) << this << ": AppListSyncableService: InitializeWithService."; |
SyncStarted(); |
@@ -130,8 +133,6 @@ void AppListSyncableService::BuildModel() { |
DVLOG(1) << this << ": AppListSyncableService: InitializeWithProfile."; |
apps_builder_->InitializeWithProfile(profile_, model_.get()); |
} |
- |
- DCHECK(profile_); |
} |
void AppListSyncableService::Observe( |