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

Side by Side Diff: components/cronet/android/java/src/org/chromium/net/UploadDataSink.java

Issue 849903002: [Cronet] Upload support for async APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move delegate destructor to implementation file to avoid chromium style error Created 5 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.net;
6
7 /**
8 * Interface with callbacks methods for {@link UploadDataProvider}. All methods
9 * may be called synchronously or asynchronously, on any thread.
10 */
11 public interface UploadDataSink {
12 /**
13 * Called by {@link UploadDataProvider} when a read succeeds.
14 * @param finalChunk For chunked uploads, {@code true} if this is the final
15 * read. It must be {@code false} for non-chunked uploads.
16 */
17 public void onReadSucceeded(boolean finalChunk);
18
19 /**
20 * Called by {@link UploadDataProvider} when a read fails.
21 * @param exception Exception passed on to the embedder.
22 */
23 public void onReadError(Exception exception);
24
25 /**
26 * Called by {@link UploadDataProvider} when a rewind succeeds.
27 */
28 public void onRewindSucceeded();
29
30 /**
31 * Called by {@link UploadDataProvider} when a rewind fails, or if rewinding
32 * uploads is not supported.
33 * @param exception Exception passed on to the embedder.
34 */
35 public void onRewindError(Exception exception);
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698