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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1169213006: Make ConnectionSecurityHelper a namespace instead of a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 3f579277dccbadd4d907d4093e87c2a34480f337..9e0322425496bd2011c76ccdf41f4ad2d38087aa 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -211,10 +211,10 @@ void LocationBarView::Init() {
location_height - bubble_vertical_padding));
const SkColor background_color =
- GetColor(ConnectionSecurityHelper::NONE, LocationBarView::BACKGROUND);
+ GetColor(ConnectionSecurityStatus::NONE, LocationBarView::BACKGROUND);
ev_bubble_view_ = new EVBubbleView(
bubble_font_list,
- GetColor(ConnectionSecurityHelper::EV_SECURE, SECURITY_TEXT),
+ GetColor(ConnectionSecurityStatus::EV_SECURE, SECURITY_TEXT),
background_color, this);
ev_bubble_view_->set_drag_controller(this);
AddChildView(ev_bubble_view_);
@@ -240,7 +240,7 @@ void LocationBarView::Init() {
ime_inline_autocomplete_view_->SetVisible(false);
AddChildView(ime_inline_autocomplete_view_);
- const SkColor text_color = GetColor(ConnectionSecurityHelper::NONE, TEXT);
+ const SkColor text_color = GetColor(ConnectionSecurityStatus::NONE, TEXT);
selected_keyword_view_ = new SelectedKeywordView(
bubble_font_list, text_color, background_color, profile());
AddChildView(selected_keyword_view_);
@@ -249,12 +249,12 @@ void LocationBarView::Init() {
suggested_text_view_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
suggested_text_view_->SetAutoColorReadabilityEnabled(false);
suggested_text_view_->SetEnabledColor(GetColor(
- ConnectionSecurityHelper::NONE, LocationBarView::DEEMPHASIZED_TEXT));
+ ConnectionSecurityStatus::NONE, LocationBarView::DEEMPHASIZED_TEXT));
suggested_text_view_->SetVisible(false);
AddChildView(suggested_text_view_);
keyword_hint_view_ = new KeywordHintView(
- profile(), font_list, GetColor(ConnectionSecurityHelper::NONE,
+ profile(), font_list, GetColor(ConnectionSecurityStatus::NONE,
LocationBarView::DEEMPHASIZED_TEXT),
background_color);
AddChildView(keyword_hint_view_);
@@ -315,7 +315,7 @@ bool LocationBarView::IsInitialized() const {
}
SkColor LocationBarView::GetColor(
- ConnectionSecurityHelper::SecurityLevel security_level,
+ ConnectionSecurityStatus::SecurityLevel security_level,
ColorKind kind) const {
const ui::NativeTheme* native_theme = GetNativeTheme();
switch (kind) {
@@ -340,17 +340,17 @@ SkColor LocationBarView::GetColor(
case SECURITY_TEXT: {
SkColor color;
switch (security_level) {
- case ConnectionSecurityHelper::EV_SECURE:
- case ConnectionSecurityHelper::SECURE:
+ case ConnectionSecurityStatus::EV_SECURE:
+ case ConnectionSecurityStatus::SECURE:
color = SkColorSetRGB(7, 149, 0);
break;
- case ConnectionSecurityHelper::SECURITY_WARNING:
- case ConnectionSecurityHelper::SECURITY_POLICY_WARNING:
+ case ConnectionSecurityStatus::SECURITY_WARNING:
+ case ConnectionSecurityStatus::SECURITY_POLICY_WARNING:
return GetColor(security_level, DEEMPHASIZED_TEXT);
break;
- case ConnectionSecurityHelper::SECURITY_ERROR:
+ case ConnectionSecurityStatus::SECURITY_ERROR:
color = SkColorSetRGB(162, 0, 0);
break;
@@ -1001,7 +1001,7 @@ bool LocationBarView::ShouldShowKeywordBubble() const {
bool LocationBarView::ShouldShowEVBubble() const {
return (GetToolbarModel()->GetSecurityLevel(false) ==
- ConnectionSecurityHelper::EV_SECURE);
+ ConnectionSecurityStatus::EV_SECURE);
}
////////////////////////////////////////////////////////////////////////////////
@@ -1222,7 +1222,7 @@ void LocationBarView::OnPaint(gfx::Canvas* canvas) {
// the omnibox background, so we can't just blindly fill our entire bounds.
gfx::Rect bounds(GetContentsBounds());
bounds.Inset(GetHorizontalEdgeThickness(), vertical_edge_thickness());
- SkColor color(GetColor(ConnectionSecurityHelper::NONE, BACKGROUND));
+ SkColor color(GetColor(ConnectionSecurityStatus::NONE, BACKGROUND));
if (is_popup_mode_) {
canvas->FillRect(bounds, color);
} else {

Powered by Google App Engine
This is Rietveld 408576698