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

Unified Diff: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java

Issue 2131323002: [Cronet] Check whether request is done before spinning up message loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 5 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: components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java
diff --git a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java
index e5a7090c3faca500d76507538e6d0100292bf8d2..694df036937ae80e17ecaf94df00746b0598f76a 100644
--- a/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java
+++ b/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetBufferedOutputStream.java
@@ -71,18 +71,18 @@ final class CronetBufferedOutputStream extends CronetOutputStream {
@Override
public void write(int oneByte) throws IOException {
+ super.write(oneByte);
mef 2016/07/08 17:39:10 Maybe just explicitly call checkNotClosed() here a
xunjieli 2016/07/08 17:56:26 Done.
ensureCanWrite(1);
mBuffer.put((byte) oneByte);
}
@Override
public void write(byte[] buffer, int offset, int count) throws IOException {
+ super.write(buffer, offset, count);
ensureCanWrite(count);
mBuffer.put(buffer, offset, count);
}
- // TODO(xunjieli): implement close().
-
/**
* Ensures that {@code count} bytes can be written to the internal buffer.
*/

Powered by Google App Engine
This is Rietveld 408576698