| 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.Date; | 6 import java.util.Date; |
| 7 import java.util.Set; | 7 import java.util.Set; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Defines methods that the actual implementation of {@link CronetEngine.Builder
} has to implement. | 10 * Defines methods that the actual implementation of {@link CronetEngine.Builder
} has to implement. |
| 11 * {@code CronetEngine.Builder} uses this interface to delegate the calls. | 11 * {@code CronetEngine.Builder} uses this interface to delegate the calls. |
| 12 * For the documentation of individual methods, please see the identically named
methods in | 12 * For the documentation of individual methods, please see the identically named
methods in |
| 13 * {@link org.chromium.net.CronetEngine.Builder} and | 13 * {@link org.chromium.net.CronetEngine.Builder} and |
| 14 * {@link org.chromium.net.ExperimentalCronetEngine.Builder}. | 14 * {@link org.chromium.net.ExperimentalCronetEngine.Builder}. |
| 15 * | 15 * |
| 16 * {@hide internal class} | 16 * {@hide internal class} |
| 17 */ | 17 */ |
| 18 public abstract class ICronetEngineBuilder { | 18 public abstract class ICronetEngineBuilder { |
| 19 // Public API methods. | 19 // Public API methods. |
| 20 public abstract ICronetEngineBuilder addPublicKeyPins(String hostName, Set<b
yte[]> pinsSha256, | 20 public abstract ICronetEngineBuilder addPublicKeyPins(String hostName, Set<b
yte[]> pinsSha256, |
| 21 boolean includeSubdomains, Date expirationDate); | 21 boolean includeSubdomains, Date expirationDate); |
| 22 public abstract ICronetEngineBuilder addQuicHint(String host, int port, int
alternatePort); | 22 public abstract ICronetEngineBuilder addQuicHint(String host, int port, int
alternatePort); |
| 23 public abstract ICronetEngineBuilder enableDataReductionProxy(String key); | |
| 24 public abstract ICronetEngineBuilder enableHttp2(boolean value); | 23 public abstract ICronetEngineBuilder enableHttp2(boolean value); |
| 25 public abstract ICronetEngineBuilder enableHttpCache(int cacheMode, long max
Size); | 24 public abstract ICronetEngineBuilder enableHttpCache(int cacheMode, long max
Size); |
| 26 public abstract ICronetEngineBuilder enablePublicKeyPinningBypassForLocalTru
stAnchors( | 25 public abstract ICronetEngineBuilder enablePublicKeyPinningBypassForLocalTru
stAnchors( |
| 27 boolean value); | 26 boolean value); |
| 28 public abstract ICronetEngineBuilder enableQuic(boolean value); | 27 public abstract ICronetEngineBuilder enableQuic(boolean value); |
| 29 public abstract ICronetEngineBuilder enableSdch(boolean value); | 28 public abstract ICronetEngineBuilder enableSdch(boolean value); |
| 30 public ICronetEngineBuilder enableBrotli(boolean value) { | 29 public ICronetEngineBuilder enableBrotli(boolean value) { |
| 31 // Do nothing for older implementations. | 30 // Do nothing for older implementations. |
| 32 return this; | 31 return this; |
| 33 } | 32 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 46 // the client. | 45 // the client. |
| 47 | 46 |
| 48 public ICronetEngineBuilder enableNetworkQualityEstimator(boolean value) { | 47 public ICronetEngineBuilder enableNetworkQualityEstimator(boolean value) { |
| 49 return this; | 48 return this; |
| 50 } | 49 } |
| 51 | 50 |
| 52 public ICronetEngineBuilder setCertVerifierData(String certVerifierData) { | 51 public ICronetEngineBuilder setCertVerifierData(String certVerifierData) { |
| 53 return this; | 52 return this; |
| 54 } | 53 } |
| 55 | 54 |
| 56 public ICronetEngineBuilder setDataReductionProxyOptions( | |
| 57 String primaryProxy, String fallbackProxy, String secureProxyCheckUr
l) { | |
| 58 return this; | |
| 59 } | |
| 60 } | 55 } |
| OLD | NEW |