| Index: chrome/browser/ui/webui/sync_setup_handler.cc
|
| diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
|
| index 324fdc826e2d9e98a871fcac22b9b6edeb455fc8..8bb50ef92f3b99f9e0bccc9f6a23722cadd44341 100644
|
| --- a/chrome/browser/ui/webui/sync_setup_handler.cc
|
| +++ b/chrome/browser/ui/webui/sync_setup_handler.cc
|
| @@ -30,6 +30,7 @@
|
| #include "chrome/browser/sync/profile_sync_service_factory.h"
|
| #include "chrome/browser/ui/browser_finder.h"
|
| #include "chrome/browser/ui/browser_navigator.h"
|
| +#include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/singleton_tabs.h"
|
| #include "chrome/browser/ui/sync/signin_histogram.h"
|
| #include "chrome/browser/ui/webui/signin/login_ui_service.h"
|
| @@ -39,6 +40,7 @@
|
| #include "chrome/common/url_constants.h"
|
| #include "components/signin/core/browser/profile_oauth2_token_service.h"
|
| #include "components/signin/core/browser/signin_error_controller.h"
|
| +#include "components/signin/core/common/profile_management_switches.h"
|
| #include "components/sync_driver/sync_prefs.h"
|
| #include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| @@ -517,13 +519,24 @@ void SyncSetupHandler::DisplayGaiaLoginInNewTabOrWindow() {
|
| ProfileOAuth2TokenServiceFactory::GetForProfile(browser->profile())->
|
| signin_error_controller();
|
| DCHECK(error_controller->HasError());
|
| - url = signin::GetReauthURL(browser->profile(),
|
| - error_controller->error_account_id());
|
| + if (switches::IsNewProfileManagement()) {
|
| + browser->window()->ShowAvatarBubbleFromAvatarButton(
|
| + BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH);
|
| + } else {
|
| + url = signin::GetReauthURL(browser->profile(),
|
| + error_controller->error_account_id());
|
| + }
|
| } else {
|
| - url = signin::GetPromoURL(signin::SOURCE_SETTINGS, true);
|
| + if (switches::IsNewProfileManagement()) {
|
| + browser->window()->ShowAvatarBubbleFromAvatarButton(
|
| + BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN);
|
| + } else {
|
| + url = signin::GetPromoURL(signin::SOURCE_SETTINGS, true);
|
| + }
|
| }
|
|
|
| - chrome::ShowSingletonTab(browser, url);
|
| + if (url.is_valid())
|
| + chrome::ShowSingletonTab(browser, url);
|
| }
|
| #endif
|
|
|
|
|