| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/signin/signin_create_profile_handler.h" | 5 #include "chrome/browser/ui/webui/signin/signin_create_profile_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 profiles::OpenBrowserWindowForProfile( | 422 profiles::OpenBrowserWindowForProfile( |
| 423 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback, | 423 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback, |
| 424 weak_ptr_factory_.GetWeakPtr()), | 424 weak_ptr_factory_.GetWeakPtr()), |
| 425 false, // Don't create a window if one already exists. | 425 false, // Don't create a window if one already exists. |
| 426 true, // Create a first run window. | 426 true, // Create a first run window. |
| 427 profile, | 427 profile, |
| 428 status); | 428 status); |
| 429 } | 429 } |
| 430 | 430 |
| 431 void SigninCreateProfileHandler::OpenSigninDialogForProfile(Profile* profile) { | 431 void SigninCreateProfileHandler::OpenSigninDialogForProfile(Profile* profile) { |
| 432 UserManager::ShowSigninDialog(web_ui()->GetWebContents()->GetBrowserContext(), | 432 UserManagerProfileDialog::ShowSigninDialog( |
| 433 profile->GetPath()); | 433 web_ui()->GetWebContents()->GetBrowserContext(), profile->GetPath()); |
| 434 } | 434 } |
| 435 | 435 |
| 436 void SigninCreateProfileHandler::ShowProfileCreationError( | 436 void SigninCreateProfileHandler::ShowProfileCreationError( |
| 437 Profile* profile, | 437 Profile* profile, |
| 438 const base::string16& error) { | 438 const base::string16& error) { |
| 439 DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_); | 439 DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_); |
| 440 web_ui()->CallJavascriptFunctionUnsafe( | 440 web_ui()->CallJavascriptFunctionUnsafe( |
| 441 "cr.webUIListenerCallback", GetWebUIListenerName(PROFILE_CREATION_ERROR), | 441 "cr.webUIListenerCallback", GetWebUIListenerName(PROFILE_CREATION_ERROR), |
| 442 base::StringValue(error)); | 442 base::StringValue(error)); |
| 443 // The ProfileManager calls us back with a NULL profile in some cases. | 443 // The ProfileManager calls us back with a NULL profile in some cases. |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 | 808 |
| 809 profiles::OpenBrowserWindowForProfile( | 809 profiles::OpenBrowserWindowForProfile( |
| 810 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback, | 810 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback, |
| 811 weak_ptr_factory_.GetWeakPtr()), | 811 weak_ptr_factory_.GetWeakPtr()), |
| 812 false, // Don't create a window if one already exists. | 812 false, // Don't create a window if one already exists. |
| 813 true, // Create a first run window. | 813 true, // Create a first run window. |
| 814 profile, | 814 profile, |
| 815 Profile::CREATE_STATUS_INITIALIZED); | 815 Profile::CREATE_STATUS_INITIALIZED); |
| 816 } | 816 } |
| 817 #endif | 817 #endif |
| OLD | NEW |