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

Unified Diff: Source/devtools/front_end/security/SecurityModel.js

Issue 1316853002: Organize security panel main view. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Change the securityPanel experiment to be non-hidden. Created 5 years, 4 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
Index: Source/devtools/front_end/security/SecurityModel.js
diff --git a/Source/devtools/front_end/security/SecurityModel.js b/Source/devtools/front_end/security/SecurityModel.js
index cdd7dc2332578e4fbfb459f5deb44c373bda96eb..8b9efea408276faffee40b1e82a9d4c55dd312aa 100644
--- a/Source/devtools/front_end/security/SecurityModel.js
+++ b/Source/devtools/front_end/security/SecurityModel.js
@@ -60,10 +60,27 @@ WebInspector.SecurityDispatcher.prototype = {
* @override
* @param {!SecurityAgent.SecurityState} securityState
* @param {!Array<!SecurityAgent.SecurityStateExplanation>=} explanations
+ * @param {!SecurityAgent.MixedContentStatus=} mixedContentStatus
+ * @param {boolean=} schemeIsCryptographic
*/
- securityStateChanged: function(securityState, explanations)
+ securityStateChanged: function(securityState, explanations, mixedContentStatus, schemeIsCryptographic)
{
var data = {"securityState": securityState, "explanations": explanations || []};
+ if (schemeIsCryptographic && mixedContentStatus) {
+ if (mixedContentStatus.ranInsecureContent) {
+ explanations.push({
+ "securityState": mixedContentStatus.ranInsecureContentStyle,
+ "summary": "Active Mixed Content",
dgozman 2015/08/26 20:28:41 UIString for all literals please.
lgarron 2015/08/26 21:42:43 Feels a bit weird here, but makes sense. Done.
+ "description": "You have recently allowed insecure content (such as scripts or iframes) to run on this site."
+ });
+ } else if (mixedContentStatus.displayedInsecureContent) {
+ explanations.push({
+ "securityState": mixedContentStatus.displayedInsecureContentStyle,
+ "summary": "Mixed Content",
+ "description": "The site includes HTTP resources."
+ });
+ }
+ }
this._model.dispatchEventToListeners(WebInspector.SecurityModel.EventTypes.SecurityStateChanged, data);
}
}

Powered by Google App Engine
This is Rietveld 408576698