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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 23531054: Don't switch browser locale on secondary user login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added TODO Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/OWNERS ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/chromeos/chromeos_version.h" 8 #include "base/chromeos/chromeos_version.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1025
1026 void SigninScreenHandler::OnDnsCleared() { 1026 void SigninScreenHandler::OnDnsCleared() {
1027 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1027 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1028 dns_clear_task_running_ = false; 1028 dns_clear_task_running_ = false;
1029 dns_cleared_ = true; 1029 dns_cleared_ = true;
1030 ShowSigninScreenIfReady(); 1030 ShowSigninScreenIfReady();
1031 } 1031 }
1032 1032
1033 // Update keyboard layout to least recently used by the user. 1033 // Update keyboard layout to least recently used by the user.
1034 void SigninScreenHandler::SetUserInputMethod(const std::string& username) { 1034 void SigninScreenHandler::SetUserInputMethod(const std::string& username) {
1035 UserManager* user_manager = UserManager::Get();
1036 if (user_manager->IsUserLoggedIn()) {
1037 // We are on sign-in screen inside user session (adding new user to
1038 // the session or on lock screen), don't switch input methods in this case.
1039 // TODO(dpolukhin): adding user and sign-in should be consistent
1040 // crbug.com/292774
1041 return;
1042 }
1043
1035 chromeos::input_method::InputMethodManager* const manager = 1044 chromeos::input_method::InputMethodManager* const manager =
1036 chromeos::input_method::InputMethodManager::Get(); 1045 chromeos::input_method::InputMethodManager::Get();
1037 1046
1038 const bool succeed = SetUserInputMethodImpl(username, manager); 1047 const bool succeed = SetUserInputMethodImpl(username, manager);
1039 1048
1040 // This is also a case when LRU layout is set only for a few local users, 1049 // This is also a case when LRU layout is set only for a few local users,
1041 // thus others need to be switched to default locale. 1050 // thus others need to be switched to default locale.
1042 // Otherwise they will end up using another user's locale to log in. 1051 // Otherwise they will end up using another user's locale to log in.
1043 if (!succeed) { 1052 if (!succeed) {
1044 DLOG(INFO) << "SetUserInputMethod('" << username 1053 DLOG(INFO) << "SetUserInputMethod('" << username
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 rvh->ExecuteJavascriptInWebFrame( 1768 rvh->ExecuteJavascriptInWebFrame(
1760 ASCIIToUTF16("//iframe[@id='signin-frame']\n//iframe"), 1769 ASCIIToUTF16("//iframe[@id='signin-frame']\n//iframe"),
1761 ASCIIToUTF16(code)); 1770 ASCIIToUTF16(code));
1762 1771
1763 // Test properties are cleared in HandleCompleteLogin because the form 1772 // Test properties are cleared in HandleCompleteLogin because the form
1764 // submission might fail and login will not be attempted after reloading 1773 // submission might fail and login will not be attempted after reloading
1765 // if they are cleared here. 1774 // if they are cleared here.
1766 } 1775 }
1767 1776
1768 } // namespace chromeos 1777 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/OWNERS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698