| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 package org.chromium.net; | 4 package org.chromium.net; |
| 5 | 5 |
| 6 import java.util.concurrent.Executor; | 6 import java.util.concurrent.Executor; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * {@link UrlRequest} that exposes experimental features. Created using | 9 * {@link UrlRequest} that exposes experimental features. To obtain an |
| 10 * {@link ExperimentalUrlRequest.Builder}. Every instance of {@link UrlRequest}
can | 10 * instance of this class, cast a {@code UrlRequest} to this type. Every |
| 11 * be casted to an instance of this class. | 11 * instance of {@code UrlRequest} can be cast to an instance of this class. |
| 12 * Instances of this class are not meant for general use, but instead only |
| 13 * to access experimental features. Note that experimental features may be |
| 14 * transitioned to supported features (and moved from |
| 15 * {@link ExperimentalUrlRequest} to {@code UrlRequest}) or may be |
| 16 * unsupported, in which case calling them may have no effect. |
| 12 * | 17 * |
| 13 * {@hide since this class exposes experimental features that should be hidden}. | 18 * {@hide since this class exposes experimental features that should be hidden}. |
| 14 */ | 19 */ |
| 15 public abstract class ExperimentalUrlRequest extends UrlRequest { | 20 public abstract class ExperimentalUrlRequest extends UrlRequest { |
| 16 /** | 21 /** |
| 17 * Builder for building {@link UrlRequest}. Created by | 22 * {@link UrlRequest#Builder} that exposes experimental features. To obtain
an |
| 18 * {@link ExperimentalCronetEngine#newUrlRequestBuilder}. A reference to thi
s class | 23 * instance of this class, cast a {@code UrlRequest.Builder} to this type. E
very |
| 19 * can also be obtained through downcasting of {@link UrlRequest.Builder}. | 24 * instance of {@code UrlRequest.Builder} can be cast to an instance of this
class. |
| 25 * Instances of this class are not meant for general use, but instead only |
| 26 * to access experimental features. Note that experimental features may be |
| 27 * transitioned to supported features (and moved from |
| 28 * {@link ExperimentalUrlRequest#Builder} to {@code UrlRequest.Builder}) or
may be |
| 29 * unsupported, in which case calling them may have no effect. |
| 20 */ | 30 */ |
| 21 public abstract static class Builder extends UrlRequest.Builder { | 31 public abstract static class Builder extends UrlRequest.Builder { |
| 22 /** | 32 /** |
| 23 * Disables connection migration for the request if enabled for | 33 * Disables connection migration for the request if enabled for |
| 24 * the session. | 34 * the session. |
| 25 * @return the builder to facilitate chaining. | 35 * @return the builder to facilitate chaining. |
| 26 */ | 36 */ |
| 27 public Builder disableConnectionMigration() { | 37 public Builder disableConnectionMigration() { |
| 28 return this; | 38 return this; |
| 29 } | 39 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 60 public abstract Builder setUploadDataProvider( | 70 public abstract Builder setUploadDataProvider( |
| 61 UploadDataProvider uploadDataProvider, Executor executor); | 71 UploadDataProvider uploadDataProvider, Executor executor); |
| 62 | 72 |
| 63 @Override | 73 @Override |
| 64 public abstract Builder allowDirectExecutor(); | 74 public abstract Builder allowDirectExecutor(); |
| 65 | 75 |
| 66 @Override | 76 @Override |
| 67 public abstract ExperimentalUrlRequest build(); | 77 public abstract ExperimentalUrlRequest build(); |
| 68 } | 78 } |
| 69 } | 79 } |
| OLD | NEW |