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

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

Issue 1284413004: Keep track of per-origin security details in the Security panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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/SecurityPanel.js
diff --git a/Source/devtools/front_end/security/SecurityPanel.js b/Source/devtools/front_end/security/SecurityPanel.js
index 721e9dcda969a1e6450e11ee929d42328151be5a..57db531056a196dabbc2ede027e4dd41eca94f81 100644
--- a/Source/devtools/front_end/security/SecurityPanel.js
+++ b/Source/devtools/front_end/security/SecurityPanel.js
@@ -71,6 +71,11 @@ WebInspector.SecurityPanel.prototype = {
this.splitWidget().setMainWidget(view);
},
+ _onOriginSecurityChanged: function(event) {
pfeldman 2015/08/18 18:35:08 code style, annotations
+ // This can't trigger unless the Security panel is open, so we're not spamming the console unless the Security panel is enabled and opened for testing.
+ console.log(event.data);
dgozman 2015/08/18 18:41:49 Please don't commit console.log into production co
+ },
+
/**
* @override
* @param {!WebInspector.Target} target
@@ -81,6 +86,7 @@ WebInspector.SecurityPanel.prototype = {
this._target = target;
this._securityModel = WebInspector.SecurityModel.fromTarget(target);
this._securityModel.addEventListener(WebInspector.SecurityModel.EventTypes.SecurityStateChanged, this._onSecurityStateChanged, this);
+ this._securityModel.addEventListener(WebInspector.SecurityModel.EventTypes.OriginSecurityChanged, this._onOriginSecurityChanged, this);
this._updateSecurityState(this._securityModel.securityState(), []);
}
},
@@ -93,6 +99,7 @@ WebInspector.SecurityPanel.prototype = {
{
if (target === this._target) {
this._securityModel.removeEventListener(WebInspector.SecurityModel.EventTypes.SecurityStateChanged, this._onSecurityStateChanged, this);
+ this._securityModel.removeEventListener(WebInspector.SecurityModel.EventTypes.OriginSecurityChanged, this._onOriginSecurityChanged, this);
delete this._securityModel;
delete this._target;
this._updateSecurityState(SecurityAgent.SecurityState.Unknown, []);

Powered by Google App Engine
This is Rietveld 408576698