Chromium Code Reviews| 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); |
| }, |