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

Unified Diff: chrome/browser/ssl/chrome_security_state_model_client.cc

Issue 1539043002: Pull SecurityStateModel out into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android fix Created 5 years 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: chrome/browser/ssl/chrome_security_state_model_client.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client.cc b/chrome/browser/ssl/chrome_security_state_model_client.cc
index ec43aef9697cecb24bd27089e926de66ab3e2131..75926c0e0805e1f949a94527af4940d1a18d0be9 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client.cc
@@ -26,24 +26,24 @@ namespace {
// SecurityStateModel::SecurityLevel (a finer-grained SecurityStateModel
// concept that can express all of SecurityStateModel's policies that
// //content doesn't necessarily know about).
-SecurityStateModel::SecurityLevel GetSecurityLevelForSecurityStyle(
- content::SecurityStyle style) {
+security_state::SecurityStateModel::SecurityLevel
+GetSecurityLevelForSecurityStyle(content::SecurityStyle style) {
switch (style) {
case content::SECURITY_STYLE_UNKNOWN:
NOTREACHED();
- return SecurityStateModel::NONE;
+ return security_state::SecurityStateModel::NONE;
case content::SECURITY_STYLE_UNAUTHENTICATED:
- return SecurityStateModel::NONE;
+ return security_state::SecurityStateModel::NONE;
case content::SECURITY_STYLE_AUTHENTICATION_BROKEN:
- return SecurityStateModel::SECURITY_ERROR;
+ return security_state::SecurityStateModel::SECURITY_ERROR;
case content::SECURITY_STYLE_WARNING:
// content currently doesn't use this style.
NOTREACHED();
- return SecurityStateModel::SECURITY_WARNING;
+ return security_state::SecurityStateModel::SECURITY_WARNING;
case content::SECURITY_STYLE_AUTHENTICATED:
- return SecurityStateModel::SECURE;
+ return security_state::SecurityStateModel::SECURE;
}
- return SecurityStateModel::NONE;
+ return security_state::SecurityStateModel::NONE;
}
} // namespace
@@ -51,13 +51,13 @@ SecurityStateModel::SecurityLevel GetSecurityLevelForSecurityStyle(
ChromeSecurityStateModelClient::ChromeSecurityStateModelClient(
content::WebContents* web_contents)
: web_contents_(web_contents),
- security_state_model_(new SecurityStateModel()) {
+ security_state_model_(new security_state::SecurityStateModel()) {
security_state_model_->SetClient(this);
}
ChromeSecurityStateModelClient::~ChromeSecurityStateModelClient() {}
-const SecurityStateModel::SecurityInfo&
+const security_state::SecurityStateModel::SecurityInfo&
ChromeSecurityStateModelClient::GetSecurityInfo() const {
return security_state_model_->GetSecurityInfo();
}
@@ -88,12 +88,12 @@ bool ChromeSecurityStateModelClient::IsOriginSecure(const GURL& url) {
}
void ChromeSecurityStateModelClient::GetVisibleSecurityState(
- SecurityStateModel::VisibleSecurityState* state) {
+ security_state::SecurityStateModel::VisibleSecurityState* state) {
content::NavigationEntry* entry =
web_contents_->GetController().GetVisibleEntry();
if (!entry ||
entry->GetSSL().security_style == content::SECURITY_STYLE_UNKNOWN) {
- *state = SecurityStateModel::VisibleSecurityState();
+ *state = security_state::SecurityStateModel::VisibleSecurityState();
return;
}

Powered by Google App Engine
This is Rietveld 408576698