Chromium Code Reviews| 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; |
| } |