Remove SSLStatus::security_style member and content::SecurityStyle
Previously, //content used SSLStatus::security_style to express an
opinion about the overall security state of the
page. SecurityStateModel/ChromeSecurityStateModelClient used this
SecurityStyle as a starting point, applying Chrome-specific policies
such as SHA1 deprecation to produce a SecurityLevel, which corresponds
to the lock icon. Then, for conveying the security state of a page back
to DevTools, the SecurityLevel would get converted back into a
SecurityStyle (often a different SecurityStyle than what //content
assigned in SSLStatus::security_style). Additionally, SecurityStyles are
used to convey per-request security info to DevTools.
This CL removes SSLStatus::security_style, so that //content no longer
assigns an overall security state to a page. This means that
SecurityStyles are now only used to convey security
information (per-page or per-request) to DevTools. We only convert from
SecurityLevels to SecurityStyles, and never the other way around.
Since content::SecurityStyle no longer serves any purpose besides
ferrying information to devtools, I removed content::SecurityStyle and
just use blink::WebSecurityStyle everywhere (which has been pulled out
into its own file, from blink::WebURLResponse::SecurityStyle).
This should hopefully make SecurityLevel/SecurityStyle less confusing,
and remove the temptation to use SSLStatus::security_style
as an indicator of overall page security state instead of the
embedder-specific SecurityLevel.
BUG=648326
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2400673003
Cr-Commit-Position: refs/heads/master@{#424436}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c70c9ba0..6747288 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -127,6 +127,7 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "services/shell/public/cpp/interface_provider.h"
+#include "third_party/WebKit/public/platform/WebSecurityStyle.h"
#include "third_party/WebKit/public/web/WebSandboxFlags.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/accessibility/ax_tree_combiner.h"
@@ -3895,7 +3896,7 @@
delegate_->VisibleSSLStateChanged(this);
SecurityStyleExplanations security_style_explanations;
- SecurityStyle security_style =
+ blink::WebSecurityStyle security_style =
delegate_->GetSecurityStyle(this, &security_style_explanations);
FOR_EACH_OBSERVER(
WebContentsObserver, observers_,