Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1301)

Unified Diff: components/cronet/android/api/src/org/chromium/net/CronetEngine.java

Issue 2029423004: QUIC/Cronet - Add Java glue layer to serialize and de-serialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_serialize_0526
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 314f70c55561bddaf932a4ffabe0db6624954c25..9126cbd74d3eafba39feffc58066edfa83e3a7bc 100644
--- a/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
+++ b/components/cronet/android/api/src/org/chromium/net/CronetEngine.java
@@ -119,6 +119,7 @@ public abstract class CronetEngine {
private long mHttpCacheMaxSize;
private String mExperimentalOptions;
private long mMockCertVerifier;
+ private String mCertVerifierData;
/**
* Default config enables SPDY, disables QUIC, SDCH and HTTP cache.
@@ -304,6 +305,22 @@ public abstract class CronetEngine {
}
/**
+ * Initializes certificate verifier's cache with certData which has a list
+ * of hosts/certificates and the results of certificate verification.
+ * @param certData a serialized representation of certificate
+ * verification results data.
+ * @return the builder to facilitate chaining.
+ */
+ public Builder setCertVerifierData(String certVerifierData) {
+ mCertVerifierData = certVerifierData;
+ return this;
+ }
+
+ String certVerifierData() {
+ return mCertVerifierData;
+ }
+
+ /**
* Enables
* <a href="https://developer.chrome.com/multidevice/data-compression">Data
* Reduction Proxy</a>. Defaults to disabled.
@@ -762,6 +779,17 @@ public abstract class CronetEngine {
public abstract void stopNetLog();
/**
+ * Returns serialized representation of certificate verifier's cache
+ * which contains the list of hosts/certificates and the certificate
+ * verification results. May block until data is received from the network
+ * thread (will timeout after 30ms).
+ *
+ * @return serialized representation of certificate verification results
+ * data.
+ */
+ public abstract String getCertVerifierData();
+
+ /**
* Returns differences in metrics collected by Cronet since the last call to
* {@link #getGlobalMetricsDeltas}.
* <p>
« no previous file with comments | « components/cronet/android/BUILD.gn ('k') | components/cronet/android/api/src/org/chromium/net/JavaCronetEngine.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698