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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js

Issue 1589703002: Surface SCT (Signed Certificate Timestamp) counts in the Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
index a4a945f95afecc802d23fc98524930d7ae399b36..bad478e748b5e12f92420121cadf2e3dc4ea816c 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
@@ -136,6 +136,40 @@ WebInspector.NetworkManager.prototype = {
return promise;
},
+ /**
+ * @param {!NetworkAgent.CertificateValidationDetails} validationDetails
+ * @return {!Promise<string>}
+ */
+ certificateTransparencySummaryPromise: function(validationDetails)
+ {
+ /**
+ * @this {WebInspector.NetworkManager}
+ * @param {function(string)} resolve
+ * @param {function()} reject
+ */
+ function executor(resolve, reject)
+ {
+ /**
+ * @param {?Protocol.Error} error
+ * @param {string} summary
+ */
+ function innerCallback(error, summary)
+ {
+ if (error) {
+ console.error("Unable to get certificate transparency summary from the browser.");
+ reject();
+ } else {
+ resolve(summary);
+ }
+ }
+ this._networkAgent.getCertificateTransparencySummary(validationDetails.isValidEv, validationDetails.numUnknownScts, validationDetails.numInvalidScts, validationDetails.numValidScts, innerCallback);
+ }
+
+ var promise = new Promise(executor.bind(this));
+
+ return promise;
+ },
+
__proto__: WebInspector.SDKModel.prototype
}

Powered by Google App Engine
This is Rietveld 408576698