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

Unified Diff: mojo/public/cpp/bindings/lib/connector.h

Issue 1055703002: Gather trace data by waiting on handles with a fixed timeout (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/public/cpp/bindings/lib/connector.h
diff --git a/mojo/public/cpp/bindings/lib/connector.h b/mojo/public/cpp/bindings/lib/connector.h
index dfbd514aff20810f4b44dcae77005c2046d51f71..d657f0da2aa5433e3c744be2d40a1fd6a8a694e5 100644
--- a/mojo/public/cpp/bindings/lib/connector.h
+++ b/mojo/public/cpp/bindings/lib/connector.h
@@ -66,14 +66,16 @@ class Connector : public MessageReceiver {
// Is the connector bound to a MessagePipe handle?
bool is_valid() const { return message_pipe_.is_valid(); }
- // Waits for the next message on the pipe, blocking until one arrives or an
- // error happens. Returns |true| if a message has been delivered, |false|
- // otherwise.
- bool WaitForIncomingMessage();
+ // Waits for the next message on the pipe, blocking until one arrives,
+ // |deadline| elapses or an error happens. Returns |true| if a message has
viettrungluu 2015/04/02 19:54:12 nit: could use an Oxford comma
+ // been delivered, |false| otherwise.
+ bool WaitForIncomingMessage(MojoDeadline deadline);
// MessageReceiver implementation:
bool Accept(Message* message) override;
+ MessagePipeHandle handle() const { return message_pipe_.get(); }
+
private:
static void CallOnHandleReady(void* closure, MojoResult result);
void OnHandleReady(MojoResult result);

Powered by Google App Engine
This is Rietveld 408576698