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

Unified Diff: base/files/file_path_watcher_linux.cc

Issue 2516353003: Stop checking that FilePathWatcher is used from a MessageLoopForIO. (Closed)
Patch Set: remove patch dependency Created 4 years, 1 month 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_path_watcher_fsevents.cc ('k') | no next file » | 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 3b0ff6236ec81fe4b41705e2b2c3ea3c2aa07896..bf17cde45f7036aea326d33190b478eb3d1df8d2 100644
--- a/base/files/file_path_watcher_linux.cc
+++ b/base/files/file_path_watcher_linux.cc
@@ -335,7 +335,7 @@ void FilePathWatcherImpl::OnFilePathChanged(InotifyReader::Watch fired_watch,
return;
}
- DCHECK(MessageLoopForIO::current());
+ DCHECK(task_runner()->BelongsToCurrentThread());
DCHECK(HasValidWatchVector());
// Used below to avoid multiple recursive updates.
@@ -420,7 +420,6 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
bool recursive,
const FilePathWatcher::Callback& callback) {
DCHECK(target_.empty());
- DCHECK(MessageLoopForIO::current());
set_task_runner(ThreadTaskRunnerHandle::Get());
callback_ = callback;
« no previous file with comments | « base/files/file_path_watcher_fsevents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698