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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.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
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service_factory.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
index 90e23d2be031485abafdbf55a9fcc7f904291fb6..f2954bc41aa52facb8e2a7d831a76da5594db2a2 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -332,8 +332,11 @@ ChromeLauncherController::ChromeLauncherController(Profile* profile,
// If no profile was passed, we take the currently active profile and use it
// as the owner of the current desktop.
// Use the original profile as on chromeos we may get a temporary off the
- // record profile.
- profile_ = ProfileManager::GetActiveUserProfile()->GetOriginalProfile();
+ // record profile, unless in guest session (where off the record profile is
+ // the right one).
+ Profile* active_profile = ProfileManager::GetActiveUserProfile();
+ profile_ = active_profile->IsGuestSession() ? active_profile :
+ active_profile->GetOriginalProfile();
app_sync_ui_state_ = AppSyncUIState::Get(profile_);
if (app_sync_ui_state_)
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service_factory.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698