| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/settings/people_handler.h" | 5 #include "chrome/browser/ui/webui/settings/people_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", | 283 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", |
| 284 signin_metrics::HISTOGRAM_REAUTH_SHOWN, | 284 signin_metrics::HISTOGRAM_REAUTH_SHOWN, |
| 285 signin_metrics::HISTOGRAM_REAUTH_MAX); | 285 signin_metrics::HISTOGRAM_REAUTH_MAX); |
| 286 | 286 |
| 287 SigninErrorController* error_controller = | 287 SigninErrorController* error_controller = |
| 288 SigninErrorControllerFactory::GetForProfile(browser->profile()); | 288 SigninErrorControllerFactory::GetForProfile(browser->profile()); |
| 289 DCHECK(error_controller->HasError()); | 289 DCHECK(error_controller->HasError()); |
| 290 if (!force_new_tab) { | 290 if (!force_new_tab) { |
| 291 browser->window()->ShowAvatarBubbleFromAvatarButton( | 291 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 292 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, | 292 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, |
| 293 signin::ManageAccountsParams(), access_point); | 293 signin::ManageAccountsParams(), access_point, false); |
| 294 } else { | 294 } else { |
| 295 url = signin::GetReauthURL( | 295 url = signin::GetReauthURL( |
| 296 access_point, signin_metrics::Reason::REASON_REAUTHENTICATION, | 296 access_point, signin_metrics::Reason::REASON_REAUTHENTICATION, |
| 297 browser->profile(), error_controller->error_account_id()); | 297 browser->profile(), error_controller->error_account_id()); |
| 298 } | 298 } |
| 299 } else { | 299 } else { |
| 300 if (!force_new_tab) { | 300 if (!force_new_tab) { |
| 301 browser->window()->ShowAvatarBubbleFromAvatarButton( | 301 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 302 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, | 302 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, |
| 303 signin::ManageAccountsParams(), access_point); | 303 signin::ManageAccountsParams(), access_point, false); |
| 304 } else { | 304 } else { |
| 305 url = signin::GetPromoURL( | 305 url = signin::GetPromoURL( |
| 306 access_point, signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, | 306 access_point, signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, |
| 307 true); | 307 true); |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 | 310 |
| 311 if (url.is_valid()) | 311 if (url.is_valid()) |
| 312 chrome::ShowSingletonTab(browser, url); | 312 chrome::ShowSingletonTab(browser, url); |
| 313 } | 313 } |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 base::FilePath profile_file_path = profile_->GetPath(); | 914 base::FilePath profile_file_path = profile_->GetPath(); |
| 915 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); | 915 ProfileMetrics::LogProfileSyncSignIn(profile_file_path); |
| 916 | 916 |
| 917 // We're done configuring, so notify ProfileSyncService that it is OK to | 917 // We're done configuring, so notify ProfileSyncService that it is OK to |
| 918 // start syncing. | 918 // start syncing. |
| 919 sync_blocker_.reset(); | 919 sync_blocker_.reset(); |
| 920 service->SetFirstSetupComplete(); | 920 service->SetFirstSetupComplete(); |
| 921 } | 921 } |
| 922 | 922 |
| 923 } // namespace settings | 923 } // namespace settings |
| OLD | NEW |