| Index: chrome/browser/ui/webui/profile_helper.cc
|
| diff --git a/chrome/browser/ui/webui/profile_helper.cc b/chrome/browser/ui/webui/profile_helper.cc
|
| index d7a6881638c82fc6c181bc7dc0974b577b0adf0d..ce3d28059eea4ee62927a0206a41ebdc2cb78532 100644
|
| --- a/chrome/browser/ui/webui/profile_helper.cc
|
| +++ b/chrome/browser/ui/webui/profile_helper.cc
|
| @@ -2,6 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +#include "chrome/browser/ui/webui/profile_helper.h"
|
| +
|
| #include "base/bind.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| @@ -9,7 +11,8 @@
|
| #include "chrome/browser/profiles/profile_window.h"
|
| #include "chrome/browser/profiles/profiles_state.h"
|
| #include "chrome/browser/ui/browser_finder.h"
|
| -#include "chrome/browser/ui/webui/profile_helper.h"
|
| +#include "chrome/browser/ui/user_manager.h"
|
| +#include "chrome/browser/ui/webui/signin/signin_utils.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/browser/web_ui.h"
|
| #include "extensions/browser/app_window/app_window.h"
|
| @@ -21,9 +24,20 @@ void OpenNewWindowForProfile(Profile* profile, Profile::CreateStatus status) {
|
| if (status != Profile::CREATE_STATUS_INITIALIZED)
|
| return;
|
|
|
| - profiles::FindOrCreateNewWindowForProfile(
|
| - profile, chrome::startup::IS_PROCESS_STARTUP,
|
| - chrome::startup::IS_FIRST_RUN, false);
|
| + if (signin::IsForceSigninEnabled()) {
|
| +// TODO(zmin): Remove the switcher once the UserManager API is finished on Mac.
|
| +#if !defined(OS_MACOSX)
|
| + if (!UserManager::IsShowing()) {
|
| + UserManager::Show(base::FilePath(), profiles::USER_MANAGER_NO_TUTORIAL,
|
| + profiles::USER_MANAGER_SELECT_PROFILE_NO_ACTION);
|
| + }
|
| + UserManager::ShowSigninDialog(nullptr, profile->GetPath());
|
| +#endif
|
| + } else {
|
| + profiles::FindOrCreateNewWindowForProfile(
|
| + profile, chrome::startup::IS_PROCESS_STARTUP,
|
| + chrome::startup::IS_FIRST_RUN, false);
|
| + }
|
| }
|
|
|
| void DeleteProfileAtPath(base::FilePath file_path,
|
|
|