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/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 proximity_auth::ScreenlockBridge::USER_POD_CUSTOM_ICON_NONE); | 79 proximity_auth::ScreenlockBridge::USER_POD_CUSTOM_ICON_NONE); |
80 icon_options.SetTooltip( | 80 icon_options.SetTooltip( |
81 l10n_util::GetStringUTF16( | 81 l10n_util::GetStringUTF16( |
82 IDS_SMART_LOCK_SCREENLOCK_TOOLTIP_HARDLOCK_REAUTH_USER), | 82 IDS_SMART_LOCK_SCREENLOCK_TOOLTIP_HARDLOCK_REAUTH_USER), |
83 true); | 83 true); |
84 | 84 |
85 const user_manager::UserList& lock_users = screen_locker->users(); | 85 const user_manager::UserList& lock_users = screen_locker->users(); |
86 DCHECK(lock_users.size() == 1); | 86 DCHECK(lock_users.size() == 1); |
87 proximity_auth::ScreenlockBridge::Get() | 87 proximity_auth::ScreenlockBridge::Get() |
88 ->lock_handler() | 88 ->lock_handler() |
89 ->ShowUserPodCustomIcon(lock_users[0]->email(), icon_options); | 89 ->ShowUserPodCustomIcon(lock_users[0]->GetAccountId(), 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 |