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

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

Issue 115733007: Fix non-otr profile's file manager being launched in guest mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: profile->IsGuestSession instead of checking cmd line Created 6 years, 11 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/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(

Powered by Google App Engine
This is Rietveld 408576698