| 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/options/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/options/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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 DCHECK(error_controller->HasError()); | 375 DCHECK(error_controller->HasError()); |
| 376 if (switches::IsNewAvatarMenu() && !force_new_tab) { | 376 if (switches::IsNewAvatarMenu() && !force_new_tab) { |
| 377 browser->window()->ShowAvatarBubbleFromAvatarButton( | 377 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 378 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, | 378 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, |
| 379 signin::ManageAccountsParams()); | 379 signin::ManageAccountsParams()); |
| 380 } else { | 380 } else { |
| 381 url = signin::GetReauthURL(browser->profile(), | 381 url = signin::GetReauthURL(browser->profile(), |
| 382 error_controller->error_account_id()); | 382 error_controller->error_account_id()); |
| 383 } | 383 } |
| 384 } else { | 384 } else { |
| 385 ProfileMetrics::LogSigninSource(signin::SOURCE_SETTINGS); |
| 385 if (switches::IsNewAvatarMenu() && !force_new_tab) { | 386 if (switches::IsNewAvatarMenu() && !force_new_tab) { |
| 386 browser->window()->ShowAvatarBubbleFromAvatarButton( | 387 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 387 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, | 388 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, |
| 388 signin::ManageAccountsParams()); | 389 signin::ManageAccountsParams()); |
| 389 } else { | 390 } else { |
| 390 url = signin::GetPromoURL(signin::SOURCE_SETTINGS, true); | 391 url = signin::GetPromoURL(signin::SOURCE_SETTINGS, true); |
| 391 } | 392 } |
| 392 } | 393 } |
| 393 | 394 |
| 394 if (url.is_valid()) | 395 if (url.is_valid()) |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 923 "SyncSetupOverlay.showSyncSetupPage", page, args); | 924 "SyncSetupOverlay.showSyncSetupPage", page, args); |
| 924 | 925 |
| 925 // Make sure the tab used for the Gaia sign in does not cover the settings | 926 // Make sure the tab used for the Gaia sign in does not cover the settings |
| 926 // tab. | 927 // tab. |
| 927 FocusUI(); | 928 FocusUI(); |
| 928 } | 929 } |
| 929 | 930 |
| 930 LoginUIService* SyncSetupHandler::GetLoginUIService() const { | 931 LoginUIService* SyncSetupHandler::GetLoginUIService() const { |
| 931 return LoginUIServiceFactory::GetForProfile(GetProfile()); | 932 return LoginUIServiceFactory::GetForProfile(GetProfile()); |
| 932 } | 933 } |
| OLD | NEW |