| Index: chrome/browser/ssl/connection_security.cc
|
| diff --git a/chrome/browser/ssl/connection_security_helper.cc b/chrome/browser/ssl/connection_security.cc
|
| similarity index 87%
|
| rename from chrome/browser/ssl/connection_security_helper.cc
|
| rename to chrome/browser/ssl/connection_security.cc
|
| index e55d1aca569cb60120471822d4cb328916b0c809..a42246114164c665441b948ad823da5b9f261758 100644
|
| --- a/chrome/browser/ssl/connection_security_helper.cc
|
| +++ b/chrome/browser/ssl/connection_security.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/ssl/connection_security_helper.h"
|
| +#include "chrome/browser/ssl/connection_security.h"
|
|
|
| #include "base/command_line.h"
|
| #include "base/metrics/field_trial.h"
|
| @@ -30,33 +30,33 @@
|
|
|
| namespace {
|
|
|
| -ConnectionSecurityHelper::SecurityLevel
|
| -GetSecurityLevelForNonSecureFieldTrial() {
|
| +connection_security::SecurityLevel GetSecurityLevelForNonSecureFieldTrial() {
|
| std::string choice =
|
| base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| switches::kMarkNonSecureAs);
|
| if (choice == switches::kMarkNonSecureAsNeutral)
|
| - return ConnectionSecurityHelper::NONE;
|
| + return connection_security::NONE;
|
| if (choice == switches::kMarkNonSecureAsDubious)
|
| - return ConnectionSecurityHelper::SECURITY_WARNING;
|
| + return connection_security::SECURITY_WARNING;
|
| if (choice == switches::kMarkNonSecureAsNonSecure)
|
| - return ConnectionSecurityHelper::SECURITY_ERROR;
|
| + return connection_security::SECURITY_ERROR;
|
|
|
| std::string group = base::FieldTrialList::FindFullName("MarkNonSecureAs");
|
| if (group == switches::kMarkNonSecureAsNeutral)
|
| - return ConnectionSecurityHelper::NONE;
|
| + return connection_security::NONE;
|
| if (group == switches::kMarkNonSecureAsDubious)
|
| - return ConnectionSecurityHelper::SECURITY_WARNING;
|
| + return connection_security::SECURITY_WARNING;
|
| if (group == switches::kMarkNonSecureAsNonSecure)
|
| - return ConnectionSecurityHelper::SECURITY_ERROR;
|
| + return connection_security::SECURITY_ERROR;
|
|
|
| - return ConnectionSecurityHelper::NONE;
|
| + return connection_security::NONE;
|
| }
|
|
|
| } // namespace
|
|
|
| -ConnectionSecurityHelper::SecurityLevel
|
| -ConnectionSecurityHelper::GetSecurityLevelForWebContents(
|
| +namespace connection_security {
|
| +
|
| +SecurityLevel GetSecurityLevelForWebContents(
|
| const content::WebContents* web_contents) {
|
| if (!web_contents)
|
| return NONE;
|
| @@ -129,7 +129,7 @@ ConnectionSecurityHelper::GetSecurityLevelForWebContents(
|
| }
|
| }
|
|
|
| -content::SecurityStyle ConnectionSecurityHelper::GetSecurityStyleForWebContents(
|
| +content::SecurityStyle GetSecurityStyleForWebContents(
|
| const content::WebContents* web_contents) {
|
| SecurityLevel security_level = GetSecurityLevelForWebContents(web_contents);
|
|
|
| @@ -149,3 +149,5 @@ content::SecurityStyle ConnectionSecurityHelper::GetSecurityStyleForWebContents(
|
| NOTREACHED();
|
| return content::SECURITY_STYLE_UNKNOWN;
|
| }
|
| +
|
| +} // namespace connection_security
|
|
|