Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: chrome/browser/ui/webui/options/sync_setup_handler.cc

Issue 2687693002: Linux/Windows: Setting focus to the first profile in profile switcher (Closed)
Patch Set: Renaming |focus_first_profile| to |is_source_keyboard| Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth", 377 UMA_HISTOGRAM_ENUMERATION("Signin.Reauth",
378 signin_metrics::HISTOGRAM_REAUTH_SHOWN, 378 signin_metrics::HISTOGRAM_REAUTH_SHOWN,
379 signin_metrics::HISTOGRAM_REAUTH_MAX); 379 signin_metrics::HISTOGRAM_REAUTH_MAX);
380 380
381 SigninErrorController* error_controller = 381 SigninErrorController* error_controller =
382 SigninErrorControllerFactory::GetForProfile(browser->profile()); 382 SigninErrorControllerFactory::GetForProfile(browser->profile());
383 DCHECK(error_controller->HasError()); 383 DCHECK(error_controller->HasError());
384 if (!force_new_tab) { 384 if (!force_new_tab) {
385 browser->window()->ShowAvatarBubbleFromAvatarButton( 385 browser->window()->ShowAvatarBubbleFromAvatarButton(
386 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH, 386 BrowserWindow::AVATAR_BUBBLE_MODE_REAUTH,
387 signin::ManageAccountsParams(), access_point); 387 signin::ManageAccountsParams(), access_point, false);
388 } else { 388 } else {
389 url = signin::GetReauthURL( 389 url = signin::GetReauthURL(
390 access_point, signin_metrics::Reason::REASON_REAUTHENTICATION, 390 access_point, signin_metrics::Reason::REASON_REAUTHENTICATION,
391 browser->profile(), error_controller->error_account_id()); 391 browser->profile(), error_controller->error_account_id());
392 } 392 }
393 } else { 393 } else {
394 if (!force_new_tab) { 394 if (!force_new_tab) {
395 browser->window()->ShowAvatarBubbleFromAvatarButton( 395 browser->window()->ShowAvatarBubbleFromAvatarButton(
396 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN, 396 BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN,
397 signin::ManageAccountsParams(), access_point); 397 signin::ManageAccountsParams(), access_point, false);
398 } else { 398 } else {
399 url = signin::GetPromoURL( 399 url = signin::GetPromoURL(
400 access_point, signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, 400 access_point, signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT,
401 true); 401 true);
402 } 402 }
403 } 403 }
404 404
405 if (url.is_valid()) 405 if (url.is_valid())
406 chrome::ShowSingletonTab(browser, url); 406 chrome::ShowSingletonTab(browser, url);
407 } 407 }
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 page, args); 947 page, args);
948 948
949 // Make sure the tab used for the Gaia sign in does not cover the settings 949 // Make sure the tab used for the Gaia sign in does not cover the settings
950 // tab. 950 // tab.
951 FocusUI(); 951 FocusUI();
952 } 952 }
953 953
954 LoginUIService* SyncSetupHandler::GetLoginUIService() const { 954 LoginUIService* SyncSetupHandler::GetLoginUIService() const {
955 return LoginUIServiceFactory::GetForProfile(GetProfile()); 955 return LoginUIServiceFactory::GetForProfile(GetProfile());
956 } 956 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/history_login_handler.cc ('k') | chrome/browser/ui/webui/settings/people_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698