| 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 * as they are backed by the same implementation and hence perform identically. |
| 13 * Instances of this class are not meant for general use, but instead only |
| 14 * to access experimental features. Experimental features may be deprecated in t
he |
| 15 * future. Use at your own risk. |
| 12 * | 16 * |
| 13 * {@hide since this class exposes experimental features that should be hidden}. | 17 * {@hide since this class exposes experimental features that should be hidden}. |
| 14 */ | 18 */ |
| 15 public abstract class ExperimentalUrlRequest extends UrlRequest { | 19 public abstract class ExperimentalUrlRequest extends UrlRequest { |
| 16 /** | 20 /** |
| 17 * Builder for building {@link UrlRequest}. Created by | 21 * {@link UrlRequest#Builder} that exposes experimental features. To obtain
an |
| 18 * {@link ExperimentalCronetEngine#newUrlRequestBuilder}. A reference to thi
s class | 22 * 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}. | 23 * instance of {@code UrlRequest.Builder} can be cast to an instance of this
class, |
| 24 * as they are backed by the same implementation and hence perform identical
ly. |
| 25 * Instances of this class are not meant for general use, but instead only |
| 26 * to access experimental features. Experimental features may be deprecated
in the |
| 27 * future. Use at your own risk. |
| 20 */ | 28 */ |
| 21 public abstract static class Builder extends UrlRequest.Builder { | 29 public abstract static class Builder extends UrlRequest.Builder { |
| 22 /** | 30 /** |
| 23 * Disables connection migration for the request if enabled for | 31 * Disables connection migration for the request if enabled for |
| 24 * the session. | 32 * the session. |
| 25 * @return the builder to facilitate chaining. | 33 * @return the builder to facilitate chaining. |
| 26 */ | 34 */ |
| 27 public Builder disableConnectionMigration() { | 35 public Builder disableConnectionMigration() { |
| 28 return this; | 36 return this; |
| 29 } | 37 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 60 public abstract Builder setUploadDataProvider( | 68 public abstract Builder setUploadDataProvider( |
| 61 UploadDataProvider uploadDataProvider, Executor executor); | 69 UploadDataProvider uploadDataProvider, Executor executor); |
| 62 | 70 |
| 63 @Override | 71 @Override |
| 64 public abstract Builder allowDirectExecutor(); | 72 public abstract Builder allowDirectExecutor(); |
| 65 | 73 |
| 66 @Override | 74 @Override |
| 67 public abstract ExperimentalUrlRequest build(); | 75 public abstract ExperimentalUrlRequest build(); |
| 68 } | 76 } |
| 69 } | 77 } |
| OLD | NEW |