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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove autogenerated actions 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
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_process_manager_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 06f9e19bdfc0de47fb37bfbef979d3b0e3040b4b..40245a05184afadd655b39a71b512d565c2629ea 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1032,9 +1032,10 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
NSInteger tag = [sender tag];
// If there are no browser windows, and we are trying to open a browser
- // for a locked profile, we have to show the User Manager instead as the
- // locked profile needs authentication.
- if (IsProfileSignedOut(lastProfile)) {
+ // for a locked profile or the system profile, we have to show the User
+ // Manager instead as the locked profile needs authentication and the system
+ // profile cannot have a browser.
+ if (IsProfileSignedOut(lastProfile) || lastProfile->IsSystemProfile()) {
UserManager::Show(base::FilePath(),
profiles::USER_MANAGER_NO_TUTORIAL,
profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
@@ -1246,11 +1247,12 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
// Otherwise open a new window.
// If the last profile was locked, we have to open the User Manager, as the
- // profile requires authentication. Similarly, because guest mode is
- // implemented as forced incognito, we can't open a new guest browser either,
- // so we have to show the User Manager as well.
+ // profile requires authentication. Similarly, because guest mode and system
+ // profile are implemented as forced incognito, we can't open a new guest
+ // browser either, so we have to show the User Manager as well.
Profile* lastProfile = [self lastProfile];
- if (lastProfile->IsGuestSession() || IsProfileSignedOut(lastProfile)) {
+ if (lastProfile->IsGuestSession() || IsProfileSignedOut(lastProfile) ||
+ lastProfile->IsSystemProfile()) {
UserManager::Show(base::FilePath(),
profiles::USER_MANAGER_NO_TUTORIAL,
profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_process_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698