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

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

Issue 1383503003: [DevTools] Show a explanation when all resources in the page have been requested securely (no-mixed… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated owners + lint Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/security-all-resources-secure-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/security-all-resources-secure-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698