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

Unified Diff: mojo/public/java/system/src/org/chromium/mojo/system/DataPipe.java

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes Created 6 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
Index: mojo/public/java/system/src/org/chromium/mojo/system/DataPipe.java
diff --git a/mojo/public/java/system/src/org/chromium/mojo/system/DataPipe.java b/mojo/public/java/system/src/org/chromium/mojo/system/DataPipe.java
index 4cd74e15685acc9835da711fcec46aeb081057e3..a5b77ae9ecb4b0687c8e3d8bde7595b74ed91e8b 100644
--- a/mojo/public/java/system/src/org/chromium/mojo/system/DataPipe.java
+++ b/mojo/public/java/system/src/org/chromium/mojo/system/DataPipe.java
@@ -161,6 +161,7 @@ public interface DataPipe {
private static final int FLAG_NONE = 0;
private static final int FLAG_ALL_OR_NONE = 1 << 0;
private static final int FLAG_QUERY = 1 << 2;
+ private static final int FLAG_PEEK = 1 << 3;
/**
* Immutable flag with not bit set.
@@ -189,7 +190,7 @@ public interface DataPipe {
/**
* Change the query bit of this flag. If set query the number of elements available to read.
- * Mutually exclusive with |dicard| and |allOrNone| is ignored if this flag is set.
+ * Mutually exclusive with |discard| and |allOrNone| is ignored if this flag is set.
*
* @param query the new value of the query bit.
* @return this.
@@ -199,6 +200,18 @@ public interface DataPipe {
}
/**
+ * Change the peek bit of this flag. If set, read the requested number of elements, and
+ * leave those elements in the pipe. A later read will return the same data.
+ * Mutually exclusive with |discard| and |query|.
+ *
+ * @param peek the new value of the peek bit.
+ * @return this.
+ */
+ public ReadFlags peek(boolean peek) {
+ return setFlag(FLAG_PEEK, peek);
+ }
+
+ /**
* @return a flag with no bit set.
*/
public static ReadFlags none() {
« no previous file with comments | « mojo/public/java/bindings/src/org/chromium/mojo/bindings/ServiceMessage.java ('k') | mojo/public/js/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698