| Index: components/cronet/android/java/src/org/chromium/net/UploadDataSink.java
|
| diff --git a/components/cronet/android/java/src/org/chromium/net/UploadDataSink.java b/components/cronet/android/java/src/org/chromium/net/UploadDataSink.java
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fb6d4c91c06e30bbb8057f9df890348ad0b0545d
|
| --- /dev/null
|
| +++ b/components/cronet/android/java/src/org/chromium/net/UploadDataSink.java
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +package org.chromium.net;
|
| +
|
| +/**
|
| + * Interface with callbacks methods for UploadDataProviders. All methods may
|
| + * be called synchronously or asynchronously, on any thread.
|
| + */
|
| +public interface UploadDataSink {
|
| + /**
|
| + * Called by UploadDataProvider when a read succeeds.
|
| + * @param finalChunk For chunked uploads, true if this is the final read.
|
| + * It must be false for non-chunked uploads.
|
| + */
|
| + public void onReadSucceeded(boolean finalChunk);
|
| +
|
| + /**
|
| + * Called by UploadDataProvider when a read fails.
|
| + * @param exception Exception passed on to the embedder.
|
| + */
|
| + public void onReadError(Exception exception);
|
| +
|
| + /**
|
| + * Called by UploadDataProvider when a rewind succeeds.
|
| + */
|
| + public void onRewindSucceeded();
|
| +
|
| + /**
|
| + * Called by UploadDataProvider when a rewind fails, or if rewinding uploads
|
| + * is not supported.
|
| + * @param exception Exception passed on to the embedder.
|
| + */
|
| + public void onRewindError(Exception exception);
|
| +}
|
|
|