Chromium Code Reviews| Index: chrome/browser/signin/signin_manager.cc |
| diff --git a/chrome/browser/signin/signin_manager.cc b/chrome/browser/signin/signin_manager.cc |
| index 8e36efd93362a7e6f02b88899a7050ad2595c7c2..463acb30eae709ae5d4229d76ab89555653917a1 100644 |
| --- a/chrome/browser/signin/signin_manager.cc |
| +++ b/chrome/browser/signin/signin_manager.cc |
| @@ -28,8 +28,9 @@ |
| #include "chrome/browser/signin/token_service_factory.h" |
| #include "chrome/browser/sync/profile_sync_service.h" |
| #include "chrome/browser/sync/sync_prefs.h" |
| -#include "chrome/browser/ui/global_error/global_error_service.h" |
| #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| +#include "chrome/browser/ui/host_desktop.h" |
| +#include "chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h" |
| #include "chrome/common/chrome_notification_types.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/pref_names.h" |
| @@ -722,14 +723,17 @@ void SigninManager::OnRegisteredForPolicy( |
| DVLOG(1) << "Policy registration succeeded: dm_token=" |
| << policy_client_->dm_token(); |
| - // TODO(dconnelly): Prompt user for whether they want to create a new profile |
| - // or not (http://crbug.com/171236), and either call SignOut() if they cancel, |
| - // TransferCredentialsToNewProfile() to create a new profile, or |
| - // LoadPolicyWithCachedClient() if they want to sign in for the current |
| - // profile. |
| - // For now, just call LoadPolicyWithCachedClient() to immediately load policy |
| - // into the current profile and finish signing in. |
| - LoadPolicyWithCachedClient(policy_client_.Pass()); |
| + |
| + // Allow user to create a new profile before continuing with sign-in. |
| + ProfileSigninConfirmationDialog::ShowDialog( |
| + possibly_invalid_username_, |
| + base::Bind(&SigninManager::SignOut, |
| + weak_pointer_factory_.GetWeakPtr()), |
| + base::Bind(&SigninManager::TransferCredentialsToNewProfile, |
| + weak_pointer_factory_.GetWeakPtr()), |
| + base::Bind(&SigninManager::LoadPolicyWithCachedClient, |
| + weak_pointer_factory_.GetWeakPtr(), |
| + base::Passed(policy_client_.Pass()))); |
|
Andrew T Wilson (Slow)
2013/02/10 20:47:26
So, this is the root of the DCHECK you are hitting
dconnelly
2013/02/11 09:35:16
Done.
|
| } |
| void SigninManager::LoadPolicyWithCachedClient( |