Index: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
index d70c4720d8ca9ede027e320a3888678457f90d1c..502c26b46bf824d234b715ed6f01b6ed51799523 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
+++ b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
@@ -539,6 +539,10 @@ WebInspector.SecurityMainView.prototype = { |
this._addMixedContentExplanation(this._mixedContentStatus.displayedInsecureContentStyle, WebInspector.UIString("Mixed Content"), WebInspector.UIString("The site includes HTTP resources."), WebInspector.NetworkLogView.MixedContentFilterValues.Displayed, showDisplayedMixedContentInNetworkPanel); |
} |
+ if (this._mixedContentStatus && (!this._mixedContentStatus.displayedInsecureContent && !this._mixedContentStatus.ranInsecureContent)) { |
+ this._addMixedContentExplanation(SecurityAgent.SecurityState.Secure, WebInspector.UIString("Secure Resources"), WebInspector.UIString("All resources on this page are served securely.")); |
lgarron
2015/10/09 00:16:31
I'm a bit split on this. On the one hand, this pat
dgozman
2015/10/09 03:52:54
I think it's better to use |_addExplanation| here.
|
+ } |
+ |
if (this._panel.filterRequestCount(WebInspector.NetworkLogView.MixedContentFilterValues.Blocked) > 0) |
this._addMixedContentExplanation(SecurityAgent.SecurityState.Info, WebInspector.UIString("Blocked mixed content"), WebInspector.UIString("Your page requested insecure resources that were blocked."), WebInspector.NetworkLogView.MixedContentFilterValues.Blocked, showBlockedMixedContentInNetworkPanel); |
@@ -574,8 +578,8 @@ WebInspector.SecurityMainView.prototype = { |
* @param {!SecurityAgent.SecurityState} securityState |
* @param {string} summary |
* @param {string} description |
- * @param {!WebInspector.NetworkLogView.MixedContentFilterValues} filterKey |
- * @param {!Function} networkFilterFn |
+ * @param {!WebInspector.NetworkLogView.MixedContentFilterValues=} filterKey |
+ * @param {!Function=} networkFilterFn |
*/ |
_addMixedContentExplanation: function(securityState, summary, description, filterKey, networkFilterFn) |
{ |
@@ -585,8 +589,12 @@ WebInspector.SecurityMainView.prototype = { |
"description": description |
}); |
+ var explanation = this._addExplanation(mixedContentExplanation); |
+ |
+ if (!filterKey || !networkFilterFn) { return; } |
dgozman
2015/10/09 03:52:54
nit: drop {} and place return on next line.
|
+ |
var filterRequestCount = this._panel.filterRequestCount(filterKey); |
- var requestsAnchor = this._addExplanation(mixedContentExplanation).createChild("div", "security-mixed-content link"); |
+ var requestsAnchor = explanation.createChild("div", "security-mixed-content link"); |
if (filterRequestCount > 0) { |
requestsAnchor.textContent = WebInspector.UIString("View %d request%s in Network Panel", filterRequestCount, (filterRequestCount > 1 ? "s" : "")); |
} else { |