Chromium Code Reviews| OLD | NEW |
|---|---|
| (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.Date; | |
| 7 import java.util.Set; | |
| 8 | |
| 9 /** | |
| 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. | |
| 12 * For the documentation of individual methods, please see the identically named methods in | |
| 13 * {@link org.chromium.net.CronetEngine.Builder} and | |
| 14 * {@link org.chromium.net.ExperimentalCronetEngine.Builder}. | |
| 15 * | |
| 16 * {@hide internal class} | |
| 17 */ | |
| 18 public abstract class ICronetEngineBuilder { | |
| 19 // Public API methods. | |
| 20 public abstract ICronetEngineBuilder addPublicKeyPins(String hostName, Set<b yte[]> pinsSha256, | |
| 21 boolean includeSubdomains, Date expirationDate); | |
| 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); | |
| 25 public abstract ICronetEngineBuilder enableHttpCache(int cacheMode, long max Size); | |
| 26 public abstract ICronetEngineBuilder enableLegacyMode(boolean value); | |
| 27 public abstract ICronetEngineBuilder enablePublicKeyPinningBypassForLocalTru stAnchors( | |
| 28 boolean value); | |
| 29 public abstract ICronetEngineBuilder enableQuic(boolean value); | |
| 30 public abstract ICronetEngineBuilder enableSdch(boolean value); | |
| 31 public abstract ICronetEngineBuilder setExperimentalOptions(String options); | |
| 32 public abstract ICronetEngineBuilder setLibraryLoader( | |
| 33 CronetEngine.Builder.LibraryLoader loader); | |
| 34 public abstract ICronetEngineBuilder setStoragePath(String value); | |
| 35 public abstract ICronetEngineBuilder setUserAgent(String userAgent); | |
| 36 public abstract String getDefaultUserAgent(); | |
| 37 public abstract CronetEngine build(); | |
|
pauljensen
2016/10/03 15:22:37
make this return ExperimentalCronetEngine and chan
kapishnikov
2016/10/03 23:49:27
Done.
| |
| 38 | |
| 39 // Experimental API methods. | |
| 40 // | |
| 41 // Note: all experimental API methods should have default implementation. Th is will allow | |
| 42 // removing the experimental methods from the implementation layer without b reaking | |
| 43 // the client. | |
| 44 public ICronetEngineBuilder enableNetworkQualityEstimator(boolean value) { | |
|
pauljensen
2016/10/03 15:22:37
insert a new line between the comment and method,
kapishnikov
2016/10/03 23:49:27
Done.
| |
| 45 return this; | |
| 46 } | |
| 47 | |
| 48 public ICronetEngineBuilder setCertVerifierData(String certVerifierData) { | |
| 49 return this; | |
| 50 } | |
| 51 | |
| 52 public ICronetEngineBuilder setDataReductionProxyOptions( | |
| 53 String primaryProxy, String fallbackProxy, String secureProxyCheckUr l) { | |
| 54 return this; | |
| 55 } | |
| 56 } | |
| OLD | NEW |