| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/signin/user_manager_screen_handler.h" | 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/value_conversions.h" | 10 #include "base/value_conversions.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 ProfileInfoCache& info_cache = | 285 ProfileInfoCache& info_cache = |
| 286 g_browser_process->profile_manager()->GetProfileInfoCache(); | 286 g_browser_process->profile_manager()->GetProfileInfoCache(); |
| 287 const size_t profile_index = GetIndexOfProfileWithEmailAndName( | 287 const size_t profile_index = GetIndexOfProfileWithEmailAndName( |
| 288 info_cache, base::UTF8ToUTF16(user_email), base::string16()); | 288 info_cache, base::UTF8ToUTF16(user_email), base::string16()); |
| 289 DCHECK_LT(profile_index, info_cache.GetNumberOfProfiles()); | 289 DCHECK_LT(profile_index, info_cache.GetNumberOfProfiles()); |
| 290 | 290 |
| 291 authenticating_profile_index_ = profile_index; | 291 authenticating_profile_index_ = profile_index; |
| 292 ReportAuthenticationResult(true, ProfileMetrics::AUTH_LOCAL); | 292 ReportAuthenticationResult(true, ProfileMetrics::AUTH_LOCAL); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void UserManagerScreenHandler::AttemptEasySignin( |
| 296 const std::string& user_email, |
| 297 const std::string& secret, |
| 298 const std::string& key_label) { |
| 299 NOTREACHED(); |
| 300 } |
| 301 |
| 295 void UserManagerScreenHandler::HandleInitialize(const base::ListValue* args) { | 302 void UserManagerScreenHandler::HandleInitialize(const base::ListValue* args) { |
| 296 SendUserList(); | 303 SendUserList(); |
| 297 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showUserManagerScreen", | 304 web_ui()->CallJavascriptFunction("cr.ui.Oobe.showUserManagerScreen", |
| 298 base::FundamentalValue(IsGuestModeEnabled()), | 305 base::FundamentalValue(IsGuestModeEnabled()), |
| 299 base::FundamentalValue(IsAddPersonEnabled())); | 306 base::FundamentalValue(IsAddPersonEnabled())); |
| 300 desktop_type_ = chrome::GetHostDesktopTypeForNativeView( | 307 desktop_type_ = chrome::GetHostDesktopTypeForNativeView( |
| 301 web_ui()->GetWebContents()->GetNativeView()); | 308 web_ui()->GetWebContents()->GetNativeView()); |
| 302 | 309 |
| 303 ScreenlockBridge::Get()->SetLockHandler(this); | 310 ScreenlockBridge::Get()->SetLockHandler(this); |
| 304 } | 311 } |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 "cr.ui.Oobe.showSignInError", | 699 "cr.ui.Oobe.showSignInError", |
| 693 base::FundamentalValue(0), | 700 base::FundamentalValue(0), |
| 694 base::StringValue(l10n_util::GetStringUTF8( | 701 base::StringValue(l10n_util::GetStringUTF8( |
| 695 auth == ProfileMetrics::AUTH_FAILED_OFFLINE ? | 702 auth == ProfileMetrics::AUTH_FAILED_OFFLINE ? |
| 696 IDS_LOGIN_ERROR_AUTHENTICATING_OFFLINE : | 703 IDS_LOGIN_ERROR_AUTHENTICATING_OFFLINE : |
| 697 IDS_LOGIN_ERROR_AUTHENTICATING)), | 704 IDS_LOGIN_ERROR_AUTHENTICATING)), |
| 698 base::StringValue(""), | 705 base::StringValue(""), |
| 699 base::FundamentalValue(0)); | 706 base::FundamentalValue(0)); |
| 700 } | 707 } |
| 701 } | 708 } |
| OLD | NEW |