| Index: components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java
|
| diff --git a/components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java b/components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java
|
| index fcc6032d07de95cd17be998539313c4f6768315e..570738feeaedfdd8ce6b2baf547f6692427838d7 100644
|
| --- a/components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java
|
| +++ b/components/cronet/android/api/src/org/chromium/net/RequestFinishedInfo.java
|
| @@ -13,6 +13,12 @@ import java.util.concurrent.Executor;
|
| /**
|
| * Information about a finished request. Passed to {@link RequestFinishedInfo.Listener}.
|
| *
|
| + * To associate the data with the original request, use
|
| + * {@link ExperimentalUrlRequest.Builder#addRequestAnnotation} or
|
| + * {@link ExperimentalBidirectionalStream.Builder#addRequestAnnotation} to add a unique identifier
|
| + * when creating the request, and call {@link #getAnnotations} when the {@link RequestFinishedInfo}
|
| + * is received to retrieve the identifier.
|
| + *
|
| * {@hide} as it's a prototype.
|
| */
|
| public abstract class RequestFinishedInfo {
|
| @@ -257,11 +263,22 @@ public abstract class RequestFinishedInfo {
|
| */
|
| public static final int CANCELED = 2;
|
|
|
| -
|
| - /** Returns the request's original URL. */
|
| + /**
|
| + * Returns the request's original URL.
|
| + *
|
| + * @return the request's original URL
|
| + */
|
| public abstract String getUrl();
|
|
|
| - /** Returns the objects that the caller has supplied when initiating the request. */
|
| + /**
|
| + * Returns the objects that the caller has supplied when initiating the request, using
|
| + * {@link ExperimentalUrlRequest.Builder#addRequestAnnotation} or
|
| + * {@link ExperimentalBidirectionalStream.Builder#addRequestAnnotation}.
|
| + * Annotations can be used to associate a {@link RequestFinishedInfo} with the original request
|
| + * or type of request.
|
| + *
|
| + * @return annotations supplied when creating the request
|
| + */
|
| public abstract Collection<Object> getAnnotations();
|
|
|
| // TODO(klm): Collect and return a chain of Metrics objects for redirect responses.
|
|
|