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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 this._networkAgent.getCertificateDetails(certificateId, innerCallbac k); 130 this._networkAgent.getCertificateDetails(certificateId, innerCallbac k);
131 } 131 }
132 132
133 var promise = new Promise(executor.bind(this)); 133 var promise = new Promise(executor.bind(this));
134 134
135 this._certificateDetailsCache.set(certificateId, promise); 135 this._certificateDetailsCache.set(certificateId, promise);
136 return promise; 136 return promise;
137 }, 137 },
138 138
139 /**
140 * @param {!NetworkAgent.CertificateValidationDetails} validationDetails
141 * @return {!Promise<string>}
142 */
143 certificateTransparencySummaryPromise: function(validationDetails)
144 {
145 /**
146 * @this {WebInspector.NetworkManager}
147 * @param {function(string)} resolve
148 * @param {function()} reject
149 */
150 function executor(resolve, reject)
151 {
152 /**
153 * @param {?Protocol.Error} error
154 * @param {string} summary
155 */
156 function innerCallback(error, summary)
157 {
158 if (error) {
159 console.error("Unable to get certificate transparency summar y from the browser.");
160 reject();
161 } else {
162 resolve(summary);
163 }
164 }
165 this._networkAgent.getCertificateTransparencySummary(validationDetai ls.isValidEv, validationDetails.numUnknownScts, validationDetails.numInvalidScts , validationDetails.numValidScts, innerCallback);
166 }
167
168 var promise = new Promise(executor.bind(this));
169
170 return promise;
171 },
172
139 __proto__: WebInspector.SDKModel.prototype 173 __proto__: WebInspector.SDKModel.prototype
140 } 174 }
141 175
142 /** 176 /**
143 * @constructor 177 * @constructor
144 * @implements {NetworkAgent.Dispatcher} 178 * @implements {NetworkAgent.Dispatcher}
145 */ 179 */
146 WebInspector.NetworkDispatcher = function(manager) 180 WebInspector.NetworkDispatcher = function(manager)
147 { 181 {
148 this._manager = manager; 182 this._manager = manager;
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 WebInspector.ResourceLoader.load(url, headers, callback); 912 WebInspector.ResourceLoader.load(url, headers, callback);
879 }, 913 },
880 914
881 __proto__: WebInspector.Object.prototype 915 __proto__: WebInspector.Object.prototype
882 } 916 }
883 917
884 /** 918 /**
885 * @type {!WebInspector.MultitargetNetworkManager} 919 * @type {!WebInspector.MultitargetNetworkManager}
886 */ 920 */
887 WebInspector.multitargetNetworkManager; 921 WebInspector.multitargetNetworkManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698