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

Unified Diff: base/files/file_descriptor_watcher_posix.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « base/deferred_sequenced_task_runner_unittest.cc ('k') | base/files/file_path_watcher_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_descriptor_watcher_posix.cc
diff --git a/base/files/file_descriptor_watcher_posix.cc b/base/files/file_descriptor_watcher_posix.cc
index 9746e35ea70ac880f564db0adc20139c4ab14f63..ce05081244aa48c15d1e2de0d16a1b3fd0abfb1f 100644
--- a/base/files/file_descriptor_watcher_posix.cc
+++ b/base/files/file_descriptor_watcher_posix.cc
@@ -124,8 +124,8 @@ void FileDescriptorWatcher::Controller::Watcher::OnFileCanReadWithoutBlocking(
DCHECK(thread_checker_.CalledOnValidThread());
// Run the callback on the sequence on which the watch was initiated.
- callback_task_runner_->PostTask(FROM_HERE,
- Bind(&Controller::RunCallback, controller_));
+ callback_task_runner_->PostTask(
+ FROM_HERE, BindOnce(&Controller::RunCallback, controller_));
}
void FileDescriptorWatcher::Controller::Watcher::OnFileCanWriteWithoutBlocking(
@@ -135,8 +135,8 @@ void FileDescriptorWatcher::Controller::Watcher::OnFileCanWriteWithoutBlocking(
DCHECK(thread_checker_.CalledOnValidThread());
// Run the callback on the sequence on which the watch was initiated.
- callback_task_runner_->PostTask(FROM_HERE,
- Bind(&Controller::RunCallback, controller_));
+ callback_task_runner_->PostTask(
+ FROM_HERE, BindOnce(&Controller::RunCallback, controller_));
}
void FileDescriptorWatcher::Controller::Watcher::
@@ -170,7 +170,7 @@ void FileDescriptorWatcher::Controller::StartWatching() {
// Controller's destructor. Since this delete task hasn't been posted yet, it
// can't run before the task posted below.
message_loop_for_io_task_runner_->PostTask(
- FROM_HERE, Bind(&Watcher::StartWatching, Unretained(watcher_.get())));
+ FROM_HERE, BindOnce(&Watcher::StartWatching, Unretained(watcher_.get())));
}
void FileDescriptorWatcher::Controller::RunCallback() {
« no previous file with comments | « base/deferred_sequenced_task_runner_unittest.cc ('k') | base/files/file_path_watcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698