| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/sync_setup_handler.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 signin::HISTOGRAM_SHOWN, | 516 signin::HISTOGRAM_SHOWN, |
| 517 signin::HISTOGRAM_MAX); | 517 signin::HISTOGRAM_MAX); |
| 518 | 518 |
| 519 SigninErrorController* error_controller = | 519 SigninErrorController* error_controller = |
| 520 ProfileOAuth2TokenServiceFactory::GetForProfile(browser->profile())-> | 520 ProfileOAuth2TokenServiceFactory::GetForProfile(browser->profile())-> |
| 521 signin_error_controller(); | 521 signin_error_controller(); |
| 522 DCHECK(error_controller->HasError()); | 522 DCHECK(error_controller->HasError()); |
| 523 if (switches::IsNewProfileManagement()) { | 523 if (switches::IsNewProfileManagement()) { |
| 524 browser->window()->ShowAvatarBubbleFromAvatarButton( | 524 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 525 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, | 525 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, |
| 526 signin::GAIA_SERVICE_TYPE_NONE); | 526 signin::ManageAccountsParams()); |
| 527 } else { | 527 } else { |
| 528 url = signin::GetReauthURL(browser->profile(), | 528 url = signin::GetReauthURL(browser->profile(), |
| 529 error_controller->error_account_id()); | 529 error_controller->error_account_id()); |
| 530 } | 530 } |
| 531 } else { | 531 } else { |
| 532 if (switches::IsNewProfileManagement()) { | 532 if (switches::IsNewProfileManagement()) { |
| 533 browser->window()->ShowAvatarBubbleFromAvatarButton( | 533 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 534 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, | 534 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, |
| 535 signin::GAIA_SERVICE_TYPE_NONE); | 535 signin::ManageAccountsParams()); |
| 536 } else { | 536 } else { |
| 537 url = signin::GetPromoURL(signin::SOURCE_SETTINGS, true); | 537 url = signin::GetPromoURL(signin::SOURCE_SETTINGS, true); |
| 538 } | 538 } |
| 539 } | 539 } |
| 540 | 540 |
| 541 if (url.is_valid()) | 541 if (url.is_valid()) |
| 542 chrome::ShowSingletonTab(browser, url); | 542 chrome::ShowSingletonTab(browser, url); |
| 543 } | 543 } |
| 544 #endif | 544 #endif |
| 545 | 545 |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 | 938 |
| 939 LoginUIService* service = GetLoginUIService(); | 939 LoginUIService* service = GetLoginUIService(); |
| 940 DCHECK(service); | 940 DCHECK(service); |
| 941 service->current_login_ui()->FocusUI(); | 941 service->current_login_ui()->FocusUI(); |
| 942 return true; | 942 return true; |
| 943 } | 943 } |
| 944 | 944 |
| 945 LoginUIService* SyncSetupHandler::GetLoginUIService() const { | 945 LoginUIService* SyncSetupHandler::GetLoginUIService() const { |
| 946 return LoginUIServiceFactory::GetForProfile(GetProfile()); | 946 return LoginUIServiceFactory::GetForProfile(GetProfile()); |
| 947 } | 947 } |
| OLD | NEW |