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

Unified Diff: chrome/browser/ui/toolbar/toolbar_model_impl.cc

Issue 1169213006: Make ConnectionSecurityHelper a namespace instead of a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/ui/toolbar/toolbar_model_impl.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
index 1f5491ce304d74e2d22305ad84568f0d34c148ea..2acd188f021f330ab7242105870950cf14b1afdb 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/search.h"
-#include "chrome/browser/ssl/connection_security_helper.h"
+#include "chrome/browser/ssl/connection_security.h"
#include "chrome/browser/ui/toolbar/toolbar_model_delegate.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -109,12 +109,12 @@ bool ToolbarModelImpl::WouldPerformSearchTermReplacement(
return !GetSearchTerms(ignore_editing).empty();
}
-ConnectionSecurityHelper::SecurityLevel ToolbarModelImpl::GetSecurityLevel(
+connection_security::SecurityLevel ToolbarModelImpl::GetSecurityLevel(
bool ignore_editing) const {
// When editing, assume no security style.
return (input_in_progress() && !ignore_editing)
- ? ConnectionSecurityHelper::NONE
- : ConnectionSecurityHelper::GetSecurityLevelForWebContents(
+ ? connection_security::NONE
+ : connection_security::GetSecurityLevelForWebContents(
delegate_->GetActiveWebContents());
}
@@ -126,18 +126,18 @@ int ToolbarModelImpl::GetIcon() const {
}
int ToolbarModelImpl::GetIconForSecurityLevel(
- ConnectionSecurityHelper::SecurityLevel level) const {
+ connection_security::SecurityLevel level) const {
switch (level) {
- case ConnectionSecurityHelper::NONE:
+ case connection_security::NONE:
return IDR_LOCATION_BAR_HTTP;
- case ConnectionSecurityHelper::EV_SECURE:
- case ConnectionSecurityHelper::SECURE:
+ case connection_security::EV_SECURE:
+ case connection_security::SECURE:
return IDR_OMNIBOX_HTTPS_VALID;
- case ConnectionSecurityHelper::SECURITY_WARNING:
+ case connection_security::SECURITY_WARNING:
return IDR_OMNIBOX_HTTPS_WARNING;
- case ConnectionSecurityHelper::SECURITY_POLICY_WARNING:
+ case connection_security::SECURITY_POLICY_WARNING:
return IDR_OMNIBOX_HTTPS_POLICY_WARNING;
- case ConnectionSecurityHelper::SECURITY_ERROR:
+ case connection_security::SECURITY_ERROR:
return IDR_OMNIBOX_HTTPS_INVALID;
}
@@ -146,7 +146,7 @@ int ToolbarModelImpl::GetIconForSecurityLevel(
}
base::string16 ToolbarModelImpl::GetEVCertName() const {
- if (GetSecurityLevel(false) != ConnectionSecurityHelper::EV_SECURE)
+ if (GetSecurityLevel(false) != connection_security::EV_SECURE)
return base::string16();
// Note: Navigation controller and active entry are guaranteed non-NULL or
@@ -239,10 +239,10 @@ base::string16 ToolbarModelImpl::GetSearchTerms(bool ignore_editing) const {
// Otherwise, extract search terms for HTTPS pages that do not have a security
// error.
- ConnectionSecurityHelper::SecurityLevel security_level =
+ connection_security::SecurityLevel security_level =
GetSecurityLevel(ignore_editing);
- return ((security_level == ConnectionSecurityHelper::NONE) ||
- (security_level == ConnectionSecurityHelper::SECURITY_ERROR))
+ return ((security_level == connection_security::NONE) ||
+ (security_level == connection_security::SECURITY_ERROR))
? base::string16()
: search_terms;
}
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model_impl.h ('k') | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698