Commit a7d2baf4 authored by Shengfa Lin's avatar Shengfa Lin Committed by Commit Bot

Convert components/nacl to base::Bind and base::Callback to

Once/Repeating

Change Bind and Callback to BindRepeating and RepeatingCallback
for nacl broker listener and nacl debug exception handler win.

Bug: 1007703
Change-Id: I1f9aac13d3478d2a121faedb47476d6455a427f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2278855Reviewed-by: default avatarBrad Nelson <bradnelson@chromium.org>
Commit-Queue: Shengfa Lin <shengfa@google.com>
Cr-Commit-Position: refs/heads/master@{#785835}
parent ac71d890
...@@ -142,7 +142,7 @@ void NaClBrokerListener::OnLaunchDebugExceptionHandler( ...@@ -142,7 +142,7 @@ void NaClBrokerListener::OnLaunchDebugExceptionHandler(
NaClStartDebugExceptionHandlerThread( NaClStartDebugExceptionHandlerThread(
base::Process(process_handle), startup_info, base::Process(process_handle), startup_info,
base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(),
base::Bind(SendReply, channel_.get(), pid)); base::BindRepeating(SendReply, channel_.get(), pid));
} }
void NaClBrokerListener::OnStopBroker() { void NaClBrokerListener::OnStopBroker() {
......
...@@ -20,11 +20,11 @@ class DebugExceptionHandler : public base::PlatformThread::Delegate { ...@@ -20,11 +20,11 @@ class DebugExceptionHandler : public base::PlatformThread::Delegate {
DebugExceptionHandler(base::Process nacl_process, DebugExceptionHandler(base::Process nacl_process,
const std::string& startup_info, const std::string& startup_info,
scoped_refptr<base::SingleThreadTaskRunner> task_runner, scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const base::Callback<void(bool)>& on_connected) base::RepeatingCallback<void(bool)> on_connected)
: nacl_process_(std::move(nacl_process)), : nacl_process_(std::move(nacl_process)),
startup_info_(startup_info), startup_info_(startup_info),
task_runner_(task_runner), task_runner_(task_runner),
on_connected_(on_connected) {} on_connected_(std::move(on_connected)) {}
void ThreadMain() override { void ThreadMain() override {
// In the Windows API, the set of processes being debugged is // In the Windows API, the set of processes being debugged is
...@@ -70,7 +70,7 @@ void NaClStartDebugExceptionHandlerThread( ...@@ -70,7 +70,7 @@ void NaClStartDebugExceptionHandlerThread(
base::Process nacl_process, base::Process nacl_process,
const std::string& startup_info, const std::string& startup_info,
scoped_refptr<base::SingleThreadTaskRunner> task_runner, scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const base::Callback<void(bool)>& on_connected) { const base::RepeatingCallback<void(bool)>& on_connected) {
// The new PlatformThread will take ownership of the // The new PlatformThread will take ownership of the
// DebugExceptionHandler object, which will delete itself on exit. // DebugExceptionHandler object, which will delete itself on exit.
DebugExceptionHandler* handler = new DebugExceptionHandler( DebugExceptionHandler* handler = new DebugExceptionHandler(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment