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

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

Issue 2033753002: Remove use of deprecated MessageLoop methods in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: manual change Created 4 years, 6 months 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/location.h"
6 #include "base/macros.h" 7 #include "base/macros.h"
7 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h"
8 #include "chrome/browser/chrome_notification_types.h" 11 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h" 12 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h"
10 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 13 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
11 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
12 #include "chromeos/dbus/dbus_thread_manager.h" 15 #include "chromeos/dbus/dbus_thread_manager.h"
13 #include "chromeos/dbus/session_manager_client.h" 16 #include "chromeos/dbus/session_manager_client.h"
14 #include "chromeos/login/auth/auth_status_consumer.h" 17 #include "chromeos/login/auth/auth_status_consumer.h"
15 #include "chromeos/login/auth/user_context.h" 18 #include "chromeos/login/auth/user_context.h"
16 #include "components/proximity_auth/screenlock_bridge.h" 19 #include "components/proximity_auth/screenlock_bridge.h"
17 #include "content/public/browser/notification_details.h" 20 #include "content/public/browser/notification_details.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 DCHECK(lock_users.size() == 1); 90 DCHECK(lock_users.size() == 1);
88 proximity_auth::ScreenlockBridge::Get() 91 proximity_auth::ScreenlockBridge::Get()
89 ->lock_handler() 92 ->lock_handler()
90 ->ShowUserPodCustomIcon(lock_users[0]->GetAccountId(), icon_options); 93 ->ShowUserPodCustomIcon(lock_users[0]->GetAccountId(), icon_options);
91 } 94 }
92 95
93 // chromeos::AuthStatusConsumer: 96 // chromeos::AuthStatusConsumer:
94 void OnAuthSuccess(const chromeos::UserContext& user_context) override { 97 void OnAuthSuccess(const chromeos::UserContext& user_context) override {
95 callback_.Run(user_context); 98 callback_.Run(user_context);
96 // Schedule deletion. 99 // Schedule deletion.
97 base::MessageLoopForUI::current()->PostTask(FROM_HERE, 100 base::ThreadTaskRunnerHandle::Get()->PostTask(
98 base::Bind(&EndReauthAttempt)); 101 FROM_HERE, base::Bind(&EndReauthAttempt));
99 } 102 }
100 103
101 void OnAuthFailure(const chromeos::AuthFailure& error) override {} 104 void OnAuthFailure(const chromeos::AuthFailure& error) override {}
102 105
103 private: 106 private:
104 content::NotificationRegistrar notification_registrar_; 107 content::NotificationRegistrar notification_registrar_;
105 EasyUnlockReauth::UserContextCallback callback_; 108 EasyUnlockReauth::UserContextCallback callback_;
106 109
107 DISALLOW_COPY_AND_ASSIGN(ReauthHandler); 110 DISALLOW_COPY_AND_ASSIGN(ReauthHandler);
108 }; 111 };
(...skipping 14 matching lines...) Expand all
123 base::Callback<void(const UserContext&)> callback) { 126 base::Callback<void(const UserContext&)> callback) {
124 DCHECK(base::MessageLoopForUI::IsCurrent()); 127 DCHECK(base::MessageLoopForUI::IsCurrent());
125 if (g_reauth_handler) 128 if (g_reauth_handler)
126 return false; 129 return false;
127 130
128 g_reauth_handler = new ReauthHandler(callback); 131 g_reauth_handler = new ReauthHandler(callback);
129 return g_reauth_handler->Start(); 132 return g_reauth_handler->Start();
130 } 133 }
131 134
132 } // namespace chromeos 135 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/app_launch_controller.cc ('k') | chrome/browser/chromeos/login/enable_debugging_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698