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

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: Opt for less specific '_addExplanation' method call; style fixes. 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 24a023984587c6e822d143aee53ce552aa059bfa..7f6680d538f2618bd377126b777e065e26b32ef2 100644
--- a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
@@ -590,6 +590,14 @@ 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._addExplanation(/** @type {!SecurityAgent.SecurityStateExplanation} */ ({
+ "securityState": SecurityAgent.SecurityState.Secure,
+ "summary": WebInspector.UIString("Secure Resources"),
+ "description": WebInspector.UIString("All resources on this page are served securely.")
+ }));
+ }
+
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);
@@ -625,8 +633,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)
{
@@ -636,8 +644,13 @@ WebInspector.SecurityMainView.prototype = {
"description": description
});
+ var explanation = this._addExplanation(mixedContentExplanation);
dgozman 2015/10/09 18:11:34 Revert all the changes here?
+
+ if (!filterKey || !networkFilterFn)
+ return;
+
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