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

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

Issue 2339223002: Cronet API Refactoring (Closed)
Patch Set: Addressed some of the Paul's comments + rebase Created 4 years, 2 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 2016 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 package org.chromium.net;
5
6 import java.util.concurrent.Executor;
7
8 /**
9 * {@link UrlRequest} that exposes experimental feature.
10 * {@hide} since this class exposes experimental features that should be hidden.
11 */
12 public abstract class ExperimentalUrlRequest extends UrlRequest {
13 /**
14 * Builder for building {@link UrlRequest}.
15 */
16 public abstract static class Builder extends UrlRequest.Builder {
17 /**
18 * Disables connection migration for the request if enabled for
19 * the session.
20 * @return the builder to facilitate chaining.
21 */
22 public abstract Builder disableConnectionMigration();
23
24 /**
25 * Associates the annotation object with this request. May add more than one.
26 * Passed through to a {@link RequestFinishedInfo.Listener},
27 * see {@link RequestFinishedInfo#getAnnotations}.
28 *
29 * @param annotation an object to pass on to the {@link RequestFinishedI nfo.Listener} with a
30 * {@link RequestFinishedInfo}.
31 * @return the builder to facilitate chaining.
32 */
33 public abstract Builder addRequestAnnotation(Object annotation);
34
35 // To support method chaining, override superclass methods to return an
36 // instance of this class instead of the parent.
37
38 @Override
39 public abstract Builder setHttpMethod(String method);
40
41 @Override
42 public abstract Builder addHeader(String header, String value);
43
44 @Override
45 public abstract Builder disableCache();
46
47 @Override
48 public abstract Builder setPriority(int priority);
49
50 @Override
51 public abstract Builder setUploadDataProvider(
52 UploadDataProvider uploadDataProvider, Executor executor);
53
54 @Override
55 public abstract Builder allowDirectExecutor();
56
57 @Override
58 public abstract ExperimentalUrlRequest build();
59 }
60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698