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

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

Issue 1169213006: Make ConnectionSecurityHelper a namespace instead of a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename namespace to connection_security Created 5 years, 6 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: 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

Powered by Google App Engine
This is Rietveld 408576698