Chromium Code Reviews| Index: components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
| diff --git a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
| index f30991ac3c7ae2223aaaeabfa683902ab575467f..c0ba787507d1d6ff664b9c455446b8d71f4c90cf 100644 |
| --- a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
| +++ b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java |
| @@ -101,7 +101,8 @@ public abstract class CronetEngine { |
| // See setters below for verbose descriptions. |
| private final Context mContext; |
| private final List<QuicHint> mQuicHints = new LinkedList<QuicHint>(); |
| - private final List<Pkp> mPkps = new LinkedList<Pkp>(); |
| + private final List<Pkp> mPkps = new LinkedList<>(); |
| + private boolean mPublicKeyPinsForLocalTrustAnchorsEnabled = false; |
|
xunjieli
2016/06/20 21:54:53
Suggest relying on the default initialization of b
kapishnikov
2016/06/29 23:04:32
Done.
|
| private String mUserAgent; |
| private String mStoragePath; |
| private boolean mLegacyModeEnabled; |
| @@ -541,6 +542,21 @@ public abstract class CronetEngine { |
| } |
| /** |
| + * Enables or disables pinning of the local (user-level) trust anchors. |
|
Ryan Sleevi
2016/06/21 00:52:26
This documentation does not reflect what the code
kapishnikov
2016/06/29 23:04:32
We decided to go with enablePublicKeyPinningBypass
|
| + * |
| + * @param value {@code true} to enable pinning, {@code false} to disable. |
| + * @return the builder to facilitate chaining. |
| + */ |
| + public Builder enablePublicKeyPinsForLocalTrustAnchors(boolean value) { |
|
xunjieli
2016/06/20 21:50:48
Suggest adding a brief documentation here on why w
kapishnikov
2016/06/29 23:04:32
Done.
|
| + mPublicKeyPinsForLocalTrustAnchorsEnabled = value; |
| + return this; |
| + } |
| + |
| + boolean publicKeyPinsForLocalTrustAnchorsEnabled() { |
| + return mPublicKeyPinsForLocalTrustAnchorsEnabled; |
| + } |
| + |
| + /** |
| * Checks whether a given string represents a valid host name for PKP and converts it |
| * to ASCII Compatible Encoding representation according to RFC 1122, RFC 1123 and |
| * RFC 3490. This method is more restrictive than required by RFC 7469. Thus, a host |