| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 | 4 |
| 5 package org.chromium.net; | 5 package org.chromium.net; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.net.http.HttpResponseCache; | 8 import android.net.http.HttpResponseCache; |
| 9 | 9 |
| 10 import java.io.IOException; | 10 import java.io.IOException; |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 * | 269 * |
| 270 * @param value {@code true} to enable the bypass, {@code false} to disa
ble. | 270 * @param value {@code true} to enable the bypass, {@code false} to disa
ble. |
| 271 * @return the builder to facilitate chaining. | 271 * @return the builder to facilitate chaining. |
| 272 */ | 272 */ |
| 273 public Builder enablePublicKeyPinningBypassForLocalTrustAnchors(boolean
value) { | 273 public Builder enablePublicKeyPinningBypassForLocalTrustAnchors(boolean
value) { |
| 274 mBuilderDelegate.enablePublicKeyPinningBypassForLocalTrustAnchors(va
lue); | 274 mBuilderDelegate.enablePublicKeyPinningBypassForLocalTrustAnchors(va
lue); |
| 275 return this; | 275 return this; |
| 276 } | 276 } |
| 277 | 277 |
| 278 /** | 278 /** |
| 279 * Sets experimental options to be used in Cronet. | |
| 280 * | |
| 281 * @param options JSON formatted experimental options. | |
| 282 * @return the builder to facilitate chaining. | |
| 283 */ | |
| 284 public Builder setExperimentalOptions(String options) { | |
| 285 mBuilderDelegate.setExperimentalOptions(options); | |
| 286 return this; | |
| 287 } | |
| 288 | |
| 289 /** | |
| 290 * Build a {@link CronetEngine} using this builder's configuration. | 279 * Build a {@link CronetEngine} using this builder's configuration. |
| 291 * @return constructed {@link CronetEngine}. | 280 * @return constructed {@link CronetEngine}. |
| 292 */ | 281 */ |
| 293 public CronetEngine build() { | 282 public CronetEngine build() { |
| 294 return mBuilderDelegate.build(); | 283 return mBuilderDelegate.build(); |
| 295 } | 284 } |
| 296 } | 285 } |
| 297 | 286 |
| 298 /** | 287 /** |
| 299 * @return a human-readable version string of the engine. | 288 * @return a human-readable version string of the engine. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 * thread calling {@link Executor#execute} to prevent blocking networking | 399 * thread calling {@link Executor#execute} to prevent blocking networking |
| 411 * operations and causing exceptions during shutdown. | 400 * operations and causing exceptions during shutdown. |
| 412 * | 401 * |
| 413 * @param url URL for the generated requests. | 402 * @param url URL for the generated requests. |
| 414 * @param callback callback object that gets invoked on different events. | 403 * @param callback callback object that gets invoked on different events. |
| 415 * @param executor {@link Executor} on which all callbacks will be invoked. | 404 * @param executor {@link Executor} on which all callbacks will be invoked. |
| 416 */ | 405 */ |
| 417 public abstract UrlRequest.Builder newUrlRequestBuilder( | 406 public abstract UrlRequest.Builder newUrlRequestBuilder( |
| 418 String url, UrlRequest.Callback callback, Executor executor); | 407 String url, UrlRequest.Callback callback, Executor executor); |
| 419 } | 408 } |
| OLD | NEW |