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

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

Issue 1307863006: [Cronet] Change interface APIs to abstract classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/UploadDataProvider.java
diff --git a/components/cronet/android/java/src/org/chromium/net/UploadDataProvider.java b/components/cronet/android/java/src/org/chromium/net/UploadDataProvider.java
index ba57799ae4cce675244c55f9f698b90856eca14a..31c0b8d772875c8604a98e84799d0cf8fd7102b9 100644
--- a/components/cronet/android/java/src/org/chromium/net/UploadDataProvider.java
+++ b/components/cronet/android/java/src/org/chromium/net/UploadDataProvider.java
@@ -16,13 +16,13 @@ import java.nio.ByteBuffer;
* <p>An upload is either always chunked, across multiple uploads if the data
* ends up being sent more than once, or never chunked.
*/
-public interface UploadDataProvider {
+public abstract class UploadDataProvider {
xunjieli 2015/09/03 04:32:02 Although the guideline says we should *always* pre
pauljensen 2015/09/11 15:20:41 I'm just trying to future-proof us. I could image
/**
* If this is a non-chunked upload, returns the length of the upload. Must
* always return -1 if this is a chunked upload.
* @return the length of the upload for non-chunked uploads, -1 otherwise.
*/
- public long getLength();
+ public abstract long getLength();
/**
* Reads upload data into {@code byteBuffer}. Upon completion, the buffer's
@@ -42,7 +42,7 @@ public interface UploadDataProvider {
* @param byteBuffer The buffer to copy the read bytes into.
* @throws IOException if any IOException occurred during the process.
*/
- public void read(UploadDataSink uploadDataSink, ByteBuffer byteBuffer)
+ public abstract void read(UploadDataSink uploadDataSink, ByteBuffer byteBuffer)
throws IOException;
/**
@@ -65,6 +65,5 @@ public interface UploadDataProvider {
* completed, successfully or otherwise.
* @throws IOException if any IOException occurred during the process.
*/
- public void rewind(UploadDataSink uploadDataSink)
- throws IOException;
+ public abstract void rewind(UploadDataSink uploadDataSink) throws IOException;
}

Powered by Google App Engine
This is Rietveld 408576698