OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
8 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h" | 8 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h" |
9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
10 #include "chrome/browser/signin/proximity_auth_facade.h" | 10 #include "chrome/browser/signin/proximity_auth_facade.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 icon_options.SetIcon( | 79 icon_options.SetIcon( |
80 proximity_auth::ScreenlockBridge::USER_POD_CUSTOM_ICON_NONE); | 80 proximity_auth::ScreenlockBridge::USER_POD_CUSTOM_ICON_NONE); |
81 icon_options.SetTooltip( | 81 icon_options.SetTooltip( |
82 l10n_util::GetStringUTF16( | 82 l10n_util::GetStringUTF16( |
83 IDS_SMART_LOCK_SCREENLOCK_TOOLTIP_HARDLOCK_REAUTH_USER), | 83 IDS_SMART_LOCK_SCREENLOCK_TOOLTIP_HARDLOCK_REAUTH_USER), |
84 true); | 84 true); |
85 | 85 |
86 const user_manager::UserList& lock_users = screen_locker->users(); | 86 const user_manager::UserList& lock_users = screen_locker->users(); |
87 DCHECK(lock_users.size() == 1); | 87 DCHECK(lock_users.size() == 1); |
88 GetScreenlockBridgeInstance()->lock_handler()->ShowUserPodCustomIcon( | 88 GetScreenlockBridgeInstance()->lock_handler()->ShowUserPodCustomIcon( |
89 lock_users[0]->email(), icon_options); | 89 lock_users[0]->GetUserID(), icon_options); |
90 } | 90 } |
91 | 91 |
92 // chromeos::AuthStatusConsumer: | 92 // chromeos::AuthStatusConsumer: |
93 void OnAuthSuccess(const chromeos::UserContext& user_context) override { | 93 void OnAuthSuccess(const chromeos::UserContext& user_context) override { |
94 callback_.Run(user_context); | 94 callback_.Run(user_context); |
95 // Schedule deletion. | 95 // Schedule deletion. |
96 base::MessageLoopForUI::current()->PostTask(FROM_HERE, | 96 base::MessageLoopForUI::current()->PostTask(FROM_HERE, |
97 base::Bind(&EndReauthAttempt)); | 97 base::Bind(&EndReauthAttempt)); |
98 } | 98 } |
99 | 99 |
(...skipping 22 matching lines...) Expand all Loading... |
122 base::Callback<void(const UserContext&)> callback) { | 122 base::Callback<void(const UserContext&)> callback) { |
123 DCHECK(base::MessageLoopForUI::IsCurrent()); | 123 DCHECK(base::MessageLoopForUI::IsCurrent()); |
124 if (g_reauth_handler) | 124 if (g_reauth_handler) |
125 return false; | 125 return false; |
126 | 126 |
127 g_reauth_handler = new ReauthHandler(callback); | 127 g_reauth_handler = new ReauthHandler(callback); |
128 return g_reauth_handler->Start(); | 128 return g_reauth_handler->Start(); |
129 } | 129 } |
130 | 130 |
131 } // namespace chromeos | 131 } // namespace chromeos |
OLD | NEW |