summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_mac.mm
diff options
context:
space:
mode:
authormlerman <mlerman@chromium.org>2015-05-25 04:40:15 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-25 11:40:49 +0000
commit7831f57d5f56e9cafe77388b20a83a90d6eb7918 (patch)
treeae659bc4ee503610bf67d6abd532f934bf57b9d5 /chrome/browser/app_controller_mac.mm
parent870dbbf58c38208eeab114d1c36700aa0460d03c (diff)
downloadchromium_src-7831f57d5f56e9cafe77388b20a83a90d6eb7918.zip
chromium_src-7831f57d5f56e9cafe77388b20a83a90d6eb7918.tar.gz
chromium_src-7831f57d5f56e9cafe77388b20a83a90d6eb7918.tar.bz2
Fix the System Profile to not load extensions. It could otherwise be forced to by GPO.
A few releases ago I introduced a System Profile to back the User Manager (https://codereview.chromium.org/847733005). This profile, however, is causing some problems. I'm trying to reduce those by making clearer the contract of what it's for: A profile that doesn't take a browser window, has no extensions, writes little to disk, etc. This certainly addresses issue #4 raised within the bug, and address the other issues as well (I can't repro them). This CL generally hardens Chrome for the System Profile in a lot of the same ways we do the Guest Profile. BUG=482176 TBR=jcivelli@chromium.org (a function, called from chrome/test that lives in c/b/profiles, was renamed). Review URL: https://codereview.chromium.org/1129293002 Cr-Commit-Position: refs/heads/master@{#331276}
Diffstat (limited to 'chrome/browser/app_controller_mac.mm')
-rw-r--r--chrome/browser/app_controller_mac.mm16
1 files changed, 9 insertions, 7 deletions
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 06f9e19..40245a0 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);