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

Unified Diff: mojo/common/data_pipe_drainer.cc

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: rebase Created 3 years, 9 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
Index: mojo/common/data_pipe_drainer.cc
diff --git a/mojo/common/data_pipe_drainer.cc b/mojo/common/data_pipe_drainer.cc
index 27bd893d8abe185107de105ade3e31a82b80eae6..e705c8d387f28fc84b823e26fcef6997b5ea4412 100644
--- a/mojo/common/data_pipe_drainer.cc
+++ b/mojo/common/data_pipe_drainer.cc
@@ -17,10 +17,10 @@ DataPipeDrainer::DataPipeDrainer(Client* client,
mojo::ScopedDataPipeConsumerHandle source)
: client_(client),
source_(std::move(source)),
- handle_watcher_(FROM_HERE),
+ handle_watcher_(FROM_HERE, SimpleWatcher::ArmingPolicy::AUTOMATIC),
weak_factory_(this) {
DCHECK(client_);
- handle_watcher_.Start(
+ handle_watcher_.Watch(
source_.get(), MOJO_HANDLE_SIGNAL_READABLE,
base::Bind(&DataPipeDrainer::WaitComplete, weak_factory_.GetWeakPtr()));
}

Powered by Google App Engine
This is Rietveld 408576698