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

Unified Diff: components/nacl/common/nacl_debug_exception_handler_win.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/nacl/common/nacl_debug_exception_handler_win.cc
diff --git a/components/nacl/common/nacl_debug_exception_handler_win.cc b/components/nacl/common/nacl_debug_exception_handler_win.cc
index d7c1bb8e68c1f06eaa959edfe0f00d7e478c8f9f..1441dc72b894f492496f7fb348be794e40f05655 100644
--- a/components/nacl/common/nacl_debug_exception_handler_win.cc
+++ b/components/nacl/common/nacl_debug_exception_handler_win.cc
@@ -13,14 +13,13 @@ namespace {
class DebugExceptionHandler : public base::PlatformThread::Delegate {
public:
- DebugExceptionHandler(
- base::Process nacl_process,
- const std::string& startup_info,
- const scoped_refptr<base::MessageLoopProxy>& message_loop,
- const base::Callback<void(bool)>& on_connected)
+ DebugExceptionHandler(base::Process nacl_process,
+ const std::string& startup_info,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
+ const base::Callback<void(bool)>& on_connected)
: nacl_process_(nacl_process.Pass()),
startup_info_(startup_info),
- message_loop_(message_loop),
+ task_runner_(task_runner),
on_connected_(on_connected) {}
void ThreadMain() override {
@@ -41,7 +40,7 @@ class DebugExceptionHandler : public base::PlatformThread::Delegate {
} else {
LOG(ERROR) << "Invalid process handle";
}
- message_loop_->PostTask(FROM_HERE, base::Bind(on_connected_, attached));
+ task_runner_->PostTask(FROM_HERE, base::Bind(on_connected_, attached));
if (attached) {
NaClDebugExceptionHandlerRun(
@@ -55,7 +54,7 @@ class DebugExceptionHandler : public base::PlatformThread::Delegate {
private:
base::Process nacl_process_;
std::string startup_info_;
- const scoped_refptr<base::MessageLoopProxy> message_loop_;
+ const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
base::Callback<void(bool)> on_connected_;
DISALLOW_COPY_AND_ASSIGN(DebugExceptionHandler);
@@ -66,12 +65,12 @@ class DebugExceptionHandler : public base::PlatformThread::Delegate {
void NaClStartDebugExceptionHandlerThread(
base::Process nacl_process,
const std::string& startup_info,
- const scoped_refptr<base::MessageLoopProxy>& message_loop,
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const base::Callback<void(bool)>& on_connected) {
// The new PlatformThread will take ownership of the
// DebugExceptionHandler object, which will delete itself on exit.
DebugExceptionHandler* handler = new DebugExceptionHandler(
- nacl_process.Pass(), startup_info, message_loop, on_connected);
+ nacl_process.Pass(), startup_info, task_runner, on_connected);
if (!base::PlatformThread::CreateNonJoinable(0, handler)) {
on_connected.Run(false);
delete handler;
« no previous file with comments | « components/nacl/common/nacl_debug_exception_handler_win.h ('k') | components/nacl/loader/nacl_ipc_adapter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698