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

Unified Diff: Source/devtools/front_end/security/SecurityModel.js

Issue 1179353002: Surface lock icon explanations in the DevTools Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use SecurityAgent.SecurityStateExplanation instead of creating a WebInspector.SecurityModel.Securit… Created 5 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: Source/devtools/front_end/security/SecurityModel.js
diff --git a/Source/devtools/front_end/security/SecurityModel.js b/Source/devtools/front_end/security/SecurityModel.js
index e9e75c23608b3d0e01813426c314116b6f5efeeb..be3a1c90079ca947d47ffdeb7808ef983aa6559f 100644
--- a/Source/devtools/front_end/security/SecurityModel.js
+++ b/Source/devtools/front_end/security/SecurityModel.js
@@ -15,7 +15,7 @@ WebInspector.SecurityModel = function(target)
target.registerSecurityDispatcher(this._dispatcher);
this._securityAgent.enable();
- this._securityState = "unknown";
+ this._securityState = /** @type {!SecurityAgent.SecurityState} */ ("unknown");
}
WebInspector.SecurityModel.EventTypes = {
@@ -59,10 +59,14 @@ WebInspector.SecurityDispatcher.prototype = {
/**
* @override
* @param {!SecurityAgent.SecurityState} securityState
+ * @param {!Array<!SecurityAgent.SecurityStateExplanation>=} explanations
*/
- securityStateChanged: function(securityState)
+ securityStateChanged: function(securityState, explanations)
{
- this._model._securityState = securityState;
- this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTypes.SecurityStateChanged, securityState);
+ var data = ({
dgozman 2015/06/19 11:33:36 nit: remove () and make this one-liner.
lgarron 2015/06/19 17:35:41 Done. (Forgot to remove these while removing the
+ "securityState": securityState,
+ "explanations": explanations || []
+ });
+ this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTypes.SecurityStateChanged, data);
}
}

Powered by Google App Engine
This is Rietveld 408576698