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. | |
pauljensen
2016/09/26 14:51:21
add comment mentioning that documentation is at id
kapishnikov
2016/09/27 18:38:25
Done.
| |
12 */ | |
13 public abstract class ICronetEngineBuilder { | |
pauljensen
2016/09/26 18:58:42
this should be @hide...otherwise it appears in jav
kapishnikov
2016/09/27 18:38:25
Done.
| |
14 // Public API methods. | |
15 public abstract ICronetEngineBuilder addPublicKeyPins(String hostName, Set<b yte[]> pinsSha256, | |
16 boolean includeSubdomains, Date expirationDate); | |
17 public abstract ICronetEngineBuilder addQuicHint(String host, int port, int alternatePort); | |
18 public abstract ICronetEngineBuilder enableDataReductionProxy(String key); | |
19 public abstract ICronetEngineBuilder enableHttp2(boolean value); | |
20 public abstract ICronetEngineBuilder enableHttpCache(int cacheMode, long max Size); | |
21 public abstract ICronetEngineBuilder enableLegacyMode(boolean value); | |
22 public abstract ICronetEngineBuilder enablePublicKeyPinningBypassForLocalTru stAnchors( | |
23 boolean value); | |
24 public abstract ICronetEngineBuilder enableQuic(boolean value); | |
25 public abstract ICronetEngineBuilder enableSdch(boolean value); | |
26 public abstract ICronetEngineBuilder setExperimentalOptions(String options); | |
27 public abstract ICronetEngineBuilder setLibraryLoader( | |
28 CronetEngine.Builder.LibraryLoader loader); | |
29 public abstract ICronetEngineBuilder setStoragePath(String value); | |
30 public abstract ICronetEngineBuilder setUserAgent(String userAgent); | |
31 public abstract String getDefaultUserAgent(); | |
32 | |
33 // Experimental API methods. | |
pauljensen
2016/09/26 14:51:21
mention that these methods must all have default i
kapishnikov
2016/09/27 18:38:25
Done.
| |
34 public ICronetEngineBuilder enableNetworkQualityEstimator(boolean value) { | |
35 return this; | |
36 } | |
37 | |
38 public ICronetEngineBuilder setCertVerifierData(String certVerifierData) { | |
39 return this; | |
40 } | |
41 | |
42 public ICronetEngineBuilder setDataReductionProxyOptions( | |
43 String primaryProxy, String fallbackProxy, String secureProxyCheckUr l) { | |
44 return this; | |
45 } | |
46 | |
47 // Build method. | |
48 public abstract CronetEngine build(); | |
pauljensen
2016/09/26 14:51:21
perhaps move this up to the "Public API methods" s
kapishnikov
2016/09/27 18:38:25
Done.
| |
49 } | |
OLD | NEW |