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

Unified Diff: base/files/file_path_watcher_linux.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/files/file_descriptor_watcher_posix.cc ('k') | base/files/file_path_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path_watcher_linux.cc
diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc
index 1dc833dc880912c6e291448d8fe44978d27badb5..f02a8ea66041011aa9c217f6d6d06a0d30df9f7e 100644
--- a/base/files/file_path_watcher_linux.cc
+++ b/base/files/file_path_watcher_linux.cc
@@ -255,8 +255,7 @@ InotifyReader::InotifyReader()
if (inotify_fd_ >= 0 && thread_.Start()) {
thread_.task_runner()->PostTask(
- FROM_HERE,
- Bind(&InotifyReaderCallback, this, inotify_fd_));
+ FROM_HERE, BindOnce(&InotifyReaderCallback, this, inotify_fd_));
valid_ = true;
}
}
@@ -331,9 +330,10 @@ void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
// access |watches_| safely. Use a WeakPtr to prevent the callback from
// running after |this| is destroyed (i.e. after the watch is cancelled).
task_runner()->PostTask(
- FROM_HERE, Bind(&FilePathWatcherImpl::OnFilePathChangedOnOriginSequence,
- weak_factory_.GetWeakPtr(), fired_watch, child, created,
- deleted, is_dir));
+ FROM_HERE,
+ BindOnce(&FilePathWatcherImpl::OnFilePathChangedOnOriginSequence,
+ weak_factory_.GetWeakPtr(), fired_watch, child, created, deleted,
+ is_dir));
}
void FilePathWatcherImpl::OnFilePathChangedOnOriginSequence(
« no previous file with comments | « base/files/file_descriptor_watcher_posix.cc ('k') | base/files/file_path_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698