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

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

Issue 2354873003: DevTools security panel: prompt user to reload for mixed requests (Closed)
Patch Set: Created 4 years, 3 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/mixed-content-reload-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 f6d962ec2f02011b2222a51995f649922733f3cd..6ed54f5c309e0c2e95594fced364141a86762e0b 100644
--- a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
@@ -769,14 +769,18 @@ WebInspector.SecurityMainView.prototype = {
"description": description
});
+ var explanation = this._addExplanation(parent, mixedContentExplanation);
+
var filterRequestCount = this._panel.filterRequestCount(filterKey);
- var requestsAnchor = this._addExplanation(parent, mixedContentExplanation).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 {
- // Network instrumentation might not have been enabled for the page load, so the security panel does not necessarily know a count of individual mixed requests at this point. Point the user at the Network Panel which prompts them to refresh.
- requestsAnchor.textContent = WebInspector.UIString("View requests in Network Panel");
+ if (filterRequestCount == 0) {
pfeldman 2016/09/20 18:14:47 style: !filterRequestCount (Blink preferred) or fi
caseq 2016/09/20 18:16:40 "if (!filterRequestCount)" (we usually don't compa
estark 2016/09/20 18:50:05 Done.
estark 2016/09/20 18:50:05 Done.
+ // Network instrumentation might not have been enabled for the page load, so the security panel does not necessarily know a count of individual mixed requests at this point. Prompt them to refresh instead of pointing them to the Network panel to get prompted to refresh.
caseq 2016/09/20 18:16:40 please split into multiple lines.
estark 2016/09/20 18:50:05 Done.
+ var refreshPrompt = explanation.createChild("div", "security-mixed-content");
+ refreshPrompt.textContent = WebInspector.UIString("Reload the page to record requests for HTTP resources.");
+ return;
}
+
+ var requestsAnchor = explanation.createChild("div", "security-mixed-content link");
+ requestsAnchor.textContent = WebInspector.UIString("View %d request%s in Network Panel", filterRequestCount, (filterRequestCount > 1 ? "s" : ""));
caseq 2016/09/20 18:16:40 JFYI since you were just moving this around -- thi
estark 2016/09/20 18:50:05 Done.
requestsAnchor.href = "";
requestsAnchor.addEventListener("click", networkFilterFn);
},
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/mixed-content-reload-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698