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

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

Issue 1057213003: Java: Introduce ResultAnd<> and use it. (Closed) Base URL: https://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/java/system/src/org/chromium/mojo/system/MessagePipeHandle.java
diff --git a/mojo/public/java/system/src/org/chromium/mojo/system/MessagePipeHandle.java b/mojo/public/java/system/src/org/chromium/mojo/system/MessagePipeHandle.java
index 60ac6825b42e40350750d595dbbed4dbc6f75a9a..deb6ac0f01e36e581d82928a641905cb00b6884d 100644
--- a/mojo/public/java/system/src/org/chromium/mojo/system/MessagePipeHandle.java
+++ b/mojo/public/java/system/src/org/chromium/mojo/system/MessagePipeHandle.java
@@ -132,10 +132,6 @@ public interface MessagePipeHandle extends Handle {
*/
public static class ReadMessageResult {
/**
- * The MojoResult value of the read call.
- */
- private int mMojoResult;
- /**
* If a message was read, the size in bytes of the message, otherwise the size in bytes of
* the next message.
*/
@@ -151,20 +147,6 @@ public interface MessagePipeHandle extends Handle {
private List<UntypedHandle> mHandles;
/**
- * @return the mojoResult
- */
- public int getMojoResult() {
- return mMojoResult;
- }
-
- /**
- * @param mojoResult the mojoResult to set
- */
- public void setMojoResult(int mojoResult) {
- mMojoResult = mojoResult;
- }
-
- /**
* @return the messageSize
*/
public int getMessageSize() {
@@ -237,6 +219,6 @@ public interface MessagePipeHandle extends Handle {
* will be true, or the read is NOT done and |wasMessageRead| will be false (if |mayDiscard| was
* set, the message is also discarded in this case).
*/
- ReadMessageResult readMessage(ByteBuffer bytes, int maxNumberOfHandles,
- ReadFlags flags);
+ ResultAnd<ReadMessageResult> readMessage(
+ ByteBuffer bytes, int maxNumberOfHandles, ReadFlags flags);
}

Powered by Google App Engine
This is Rietveld 408576698