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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: and a few fewer unnecessary checks Created 5 years, 7 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/startup/startup_browser_creator.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc
index 82f182bb39d5ad8258840ca0900d60f37575a454..38cc153f64b02b303c24e3c0c13b89602e550bb3 100644
--- a/chrome/browser/ui/startup/startup_browser_creator.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -682,15 +682,16 @@ bool StartupBrowserCreator::ProcessCmdLineImpl(
bool signin_required = profile_index != std::string::npos &&
profile_info.ProfileIsSigninRequiredAtIndex(profile_index);
- // Guest or locked profiles cannot be re-opened on startup. The only
- // exception is if there's already a Guest window open in a separate
+ // Guest, system or locked profiles cannot be re-opened on startup. The
+ // only exception is if there's already a Guest window open in a separate
// process (for example, launching a new browser after clicking on a
// downloaded file in Guest mode).
- bool has_guest_browsers = last_used_profile->IsGuestSession() &&
+ bool guest_or_system = last_used_profile->IsGuestSession() ||
+ last_used_profile->IsSystemProfile();
+ bool has_guest_browsers = guest_or_system &&
chrome::GetTotalBrowserCountForProfile(
last_used_profile->GetOffTheRecordProfile()) > 0;
msw 2015/05/21 04:34:43 Is GetOffTheRecordProfile safe to call for the sys
Mike Lerman 2015/05/21 15:27:31 Don't see why not? the function just iterates over
msw 2015/05/21 17:48:12 Acknowledged.
- if (signin_required ||
- (last_used_profile->IsGuestSession() && !has_guest_browsers)) {
+ if (signin_required || (guest_or_system && !has_guest_browsers)) {
profiles::UserManagerProfileSelected action =
command_line.HasSwitch(switches::kShowAppList) ?
profiles::USER_MANAGER_SELECT_PROFILE_APP_LAUNCHER :

Powered by Google App Engine
This is Rietveld 408576698