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..52f89e4711b761441498c2b5ec6a606cab6dc681 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 mPinLocalTrustAnchors = false; |
|
Ryan Sleevi
2016/06/13 17:03:11
STYLE suggestion: Keep this variable named consist
kapishnikov
2016/06/15 00:56:20
Done, following the existing pattern.
|
| 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. |
| + * |
| + * @param value {@code true} to enable pinning, {@code false} to disable. |
| + * @return the builder to facilitate chaining. |
| + */ |
| + public Builder enableLocalTrustAnchorPinning(boolean value) { |
| + mPinLocalTrustAnchors = value; |
| + return this; |
| + } |
| + |
| + boolean localTrustAnchorsPinningEnabled() { |
|
Ryan Sleevi
2016/06/13 17:03:11
naming: I'm not sufficiently read on Java style, b
kapishnikov
2016/06/15 00:56:20
Point taken. I have followed the pattern how the o
|
| + return mPinLocalTrustAnchors; |
| + } |
| + |
| + /** |
| * 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 |