OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.PanelWithSidebar} | 7 * @extends {WebInspector.PanelWithSidebar} |
8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
9 */ | 9 */ |
10 WebInspector.SecurityPanel = function() | 10 WebInspector.SecurityPanel = function() |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
762 * @param {!Function} networkFilterFn | 762 * @param {!Function} networkFilterFn |
763 */ | 763 */ |
764 _addMixedContentExplanation: function(parent, securityState, summary, descri ption, filterKey, networkFilterFn) | 764 _addMixedContentExplanation: function(parent, securityState, summary, descri ption, filterKey, networkFilterFn) |
765 { | 765 { |
766 var mixedContentExplanation = /** @type {!SecurityAgent.SecurityStateExp lanation} */ ({ | 766 var mixedContentExplanation = /** @type {!SecurityAgent.SecurityStateExp lanation} */ ({ |
767 "securityState": securityState, | 767 "securityState": securityState, |
768 "summary": summary, | 768 "summary": summary, |
769 "description": description | 769 "description": description |
770 }); | 770 }); |
771 | 771 |
772 var explanation = this._addExplanation(parent, mixedContentExplanation); | |
773 | |
772 var filterRequestCount = this._panel.filterRequestCount(filterKey); | 774 var filterRequestCount = this._panel.filterRequestCount(filterKey); |
773 var requestsAnchor = this._addExplanation(parent, mixedContentExplanatio n).createChild("div", "security-mixed-content link"); | 775 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.
| |
774 if (filterRequestCount > 0) { | 776 // Network instrumentation might not have been enabled for the page load, so the security panel does not necessarily know a count of individual mixe d 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.
| |
775 requestsAnchor.textContent = WebInspector.UIString("View %d request% s in Network Panel", filterRequestCount, (filterRequestCount > 1 ? "s" : "")); | 777 var refreshPrompt = explanation.createChild("div", "security-mixed-c ontent"); |
776 } else { | 778 refreshPrompt.textContent = WebInspector.UIString("Reload the page t o record requests for HTTP resources."); |
777 // Network instrumentation might not have been enabled for the page load, so the security panel does not necessarily know a count of individual mixe d requests at this point. Point the user at the Network Panel which prompts them to refresh. | 779 return; |
778 requestsAnchor.textContent = WebInspector.UIString("View requests in Network Panel"); | |
779 } | 780 } |
781 | |
782 var requestsAnchor = explanation.createChild("div", "security-mixed-cont ent link"); | |
783 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.
| |
780 requestsAnchor.href = ""; | 784 requestsAnchor.href = ""; |
781 requestsAnchor.addEventListener("click", networkFilterFn); | 785 requestsAnchor.addEventListener("click", networkFilterFn); |
782 }, | 786 }, |
783 | 787 |
784 _addContentWithCertErrorsExplanations: function() | 788 _addContentWithCertErrorsExplanations: function() |
785 { | 789 { |
786 if (!this._schemeIsCryptographic) | 790 if (!this._schemeIsCryptographic) |
787 return; | 791 return; |
788 | 792 |
789 if (!this._insecureContentStatus) | 793 if (!this._insecureContentStatus) |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1035 row.createChild("div").textContent = key; | 1039 row.createChild("div").textContent = key; |
1036 | 1040 |
1037 var valueDiv = row.createChild("div"); | 1041 var valueDiv = row.createChild("div"); |
1038 if (typeof value === "string") { | 1042 if (typeof value === "string") { |
1039 valueDiv.textContent = value; | 1043 valueDiv.textContent = value; |
1040 } else { | 1044 } else { |
1041 valueDiv.appendChild(value); | 1045 valueDiv.appendChild(value); |
1042 } | 1046 } |
1043 } | 1047 } |
1044 } | 1048 } |
OLD | NEW |