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

Unified Diff: base/files/file_path_watcher_win.cc

Issue 2598193002: Allow FilePathWatcher to be used from sequenced tasks. (Closed)
Patch Set: thread -> sequence in comment Created 4 years 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_linux.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_win.cc
diff --git a/base/files/file_path_watcher_win.cc b/base/files/file_path_watcher_win.cc
index 2309947fab401e6b3cc44846c5a158eb62b022c9..65c13dae74abf1194da34ca80d7278d235e60339 100644
--- a/base/files/file_path_watcher_win.cc
+++ b/base/files/file_path_watcher_win.cc
@@ -11,7 +11,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/threading/thread_task_runner_handle.h"
+#include "base/threading/sequenced_task_runner_handle.h"
#include "base/time/time.h"
#include "base/win/object_watcher.h"
@@ -83,7 +83,7 @@ bool FilePathWatcherImpl::Watch(const FilePath& path,
const FilePathWatcher::Callback& callback) {
DCHECK(target_.value().empty()); // Can only watch one path.
- set_task_runner(ThreadTaskRunnerHandle::Get());
+ set_task_runner(SequencedTaskRunnerHandle::Get());
callback_ = callback;
target_ = path;
recursive_watch_ = recursive;
@@ -109,7 +109,7 @@ void FilePathWatcherImpl::Cancel() {
return;
}
- DCHECK(task_runner()->BelongsToCurrentThread());
+ DCHECK(task_runner()->RunsTasksOnCurrentThread());
set_cancelled();
if (handle_ != INVALID_HANDLE_VALUE)
« no previous file with comments | « base/files/file_path_watcher_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698