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

Side by Side Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.cc

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix in original easy unlock code' 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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698