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

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

Issue 1534173003: ChromeOS user_manager: move all KnownUser code to separate file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/FindUsingSAML/IsUsingSAML/ Created 5 years 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) 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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "chrome/grit/chromium_strings.h" 62 #include "chrome/grit/chromium_strings.h"
63 #include "chrome/grit/generated_resources.h" 63 #include "chrome/grit/generated_resources.h"
64 #include "chromeos/dbus/dbus_thread_manager.h" 64 #include "chromeos/dbus/dbus_thread_manager.h"
65 #include "chromeos/dbus/power_manager_client.h" 65 #include "chromeos/dbus/power_manager_client.h"
66 #include "chromeos/login/auth/key.h" 66 #include "chromeos/login/auth/key.h"
67 #include "chromeos/login/auth/user_context.h" 67 #include "chromeos/login/auth/user_context.h"
68 #include "chromeos/network/network_state.h" 68 #include "chromeos/network/network_state.h"
69 #include "chromeos/network/network_state_handler.h" 69 #include "chromeos/network/network_state_handler.h"
70 #include "components/login/localized_values_builder.h" 70 #include "components/login/localized_values_builder.h"
71 #include "components/proximity_auth/screenlock_bridge.h" 71 #include "components/proximity_auth/screenlock_bridge.h"
72 #include "components/user_manager/known_user.h"
72 #include "components/user_manager/user.h" 73 #include "components/user_manager/user.h"
73 #include "components/user_manager/user_manager.h" 74 #include "components/user_manager/user_manager.h"
74 #include "components/user_manager/user_type.h" 75 #include "components/user_manager/user_type.h"
75 #include "content/public/browser/render_frame_host.h" 76 #include "content/public/browser/render_frame_host.h"
76 #include "content/public/browser/web_contents.h" 77 #include "content/public/browser/web_contents.h"
77 #include "google_apis/gaia/gaia_auth_util.h" 78 #include "google_apis/gaia/gaia_auth_util.h"
78 #include "third_party/cros_system_api/dbus/service_constants.h" 79 #include "third_party/cros_system_api/dbus/service_constants.h"
79 #include "ui/base/ime/chromeos/ime_keyboard.h" 80 #include "ui/base/ime/chromeos/ime_keyboard.h"
80 #include "ui/base/ime/chromeos/input_method_descriptor.h" 81 #include "ui/base/ime/chromeos/input_method_descriptor.h"
81 #include "ui/base/ime/chromeos/input_method_manager.h" 82 #include "ui/base/ime/chromeos/input_method_manager.h"
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) { 1224 void SigninScreenHandler::HandleFocusPod(const AccountId& account_id) {
1224 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get()); 1225 SetUserInputMethod(account_id.GetUserEmail(), ime_state_.get());
1225 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id); 1226 WallpaperManager::Get()->SetUserWallpaperDelayed(account_id);
1226 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(account_id); 1227 proximity_auth::ScreenlockBridge::Get()->SetFocusedUser(account_id);
1227 if (delegate_) 1228 if (delegate_)
1228 delegate_->CheckUserStatus(account_id); 1229 delegate_->CheckUserStatus(account_id);
1229 if (!test_focus_pod_callback_.is_null()) 1230 if (!test_focus_pod_callback_.is_null())
1230 test_focus_pod_callback_.Run(); 1231 test_focus_pod_callback_.Run();
1231 1232
1232 bool use_24hour_clock = false; 1233 bool use_24hour_clock = false;
1233 if (user_manager::UserManager::Get()->GetKnownUserBooleanPref( 1234 if (user_manager::known_user::GetBooleanPref(
1234 account_id, prefs::kUse24HourClock, &use_24hour_clock)) { 1235 account_id, prefs::kUse24HourClock, &use_24hour_clock)) {
1235 g_browser_process->platform_part() 1236 g_browser_process->platform_part()
1236 ->GetSystemClock() 1237 ->GetSystemClock()
1237 ->SetLastFocusedPodHourClockType(use_24hour_clock ? base::k24HourClock 1238 ->SetLastFocusedPodHourClockType(use_24hour_clock ? base::k24HourClock
1238 : base::k12HourClock); 1239 : base::k12HourClock);
1239 } 1240 }
1240 } 1241 }
1241 1242
1242 void SigninScreenHandler::HandleGetPublicSessionKeyboardLayouts( 1243 void SigninScreenHandler::HandleGetPublicSessionKeyboardLayouts(
1243 const AccountId& account_id, 1244 const AccountId& account_id,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 1276
1276 void SigninScreenHandler::HandleLogRemoveUserWarningShown() { 1277 void SigninScreenHandler::HandleLogRemoveUserWarningShown() {
1277 ProfileMetrics::LogProfileDeleteUser( 1278 ProfileMetrics::LogProfileDeleteUser(
1278 ProfileMetrics::DELETE_PROFILE_USER_MANAGER_SHOW_WARNING); 1279 ProfileMetrics::DELETE_PROFILE_USER_MANAGER_SHOW_WARNING);
1279 } 1280 }
1280 1281
1281 void SigninScreenHandler::HandleFirstIncorrectPasswordAttempt( 1282 void SigninScreenHandler::HandleFirstIncorrectPasswordAttempt(
1282 const AccountId& account_id) { 1283 const AccountId& account_id) {
1283 // TODO(ginkage): Fix this case once crbug.com/469987 is ready. 1284 // TODO(ginkage): Fix this case once crbug.com/469987 is ready.
1284 /* 1285 /*
1285 if (user_manager::UserManager::Get()->FindUsingSAML(email)) 1286 if (user_manager::known_user::IsUsingSAML(email))
1286 RecordReauthReason(email, ReauthReason::INCORRECT_SAML_PASSWORD_ENTERED); 1287 RecordReauthReason(email, ReauthReason::INCORRECT_SAML_PASSWORD_ENTERED);
1287 */ 1288 */
1288 } 1289 }
1289 1290
1290 void SigninScreenHandler::HandleMaxIncorrectPasswordAttempts( 1291 void SigninScreenHandler::HandleMaxIncorrectPasswordAttempts(
1291 const AccountId& account_id) { 1292 const AccountId& account_id) {
1292 RecordReauthReason(account_id, ReauthReason::INCORRECT_PASSWORD_ENTERED); 1293 RecordReauthReason(account_id, ReauthReason::INCORRECT_PASSWORD_ENTERED);
1293 } 1294 }
1294 1295
1295 bool SigninScreenHandler::AllWhitelistedUsersPresent() { 1296 bool SigninScreenHandler::AllWhitelistedUsersPresent() {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 return gaia_screen_handler_->frame_error(); 1382 return gaia_screen_handler_->frame_error();
1382 } 1383 }
1383 1384
1384 void SigninScreenHandler::OnCapsLockChanged(bool enabled) { 1385 void SigninScreenHandler::OnCapsLockChanged(bool enabled) {
1385 caps_lock_enabled_ = enabled; 1386 caps_lock_enabled_ = enabled;
1386 if (page_is_ready()) 1387 if (page_is_ready())
1387 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_); 1388 CallJS("login.AccountPickerScreen.setCapsLockState", caps_lock_enabled_);
1388 } 1389 }
1389 1390
1390 } // namespace chromeos 1391 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698