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 6b4235d1f1b8bcacf45da01c17582ccdf9de49a4..6a4a4cff85885e11593b856f1891cdae15c0acf8 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -362,6 +362,7 @@ SkColor LocationBarView::GetSecureTextColor( |
} |
case security_state::SecurityStateModel::SECURITY_WARNING: |
+ case security_state::SecurityStateModel::NONE: |
Evan Stade
2016/05/12 16:08:11
I'd rather you not add this, doesn't seem necessar
palmer
2016/05/12 21:23:14
Done.
|
return GetColor(TEXT); |
break; |
@@ -869,9 +870,15 @@ void LocationBarView::RefreshLocationIcon() { |
icon_id = gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_IN_CHIP; |
icon_color = location_icon_view_->GetTextColor(); |
} else { |
- icon_id = omnibox_view_->GetVectorIcon( |
- color_utils::IsDark(GetColor(BACKGROUND))); |
- icon_color = color_utils::DeriveDefaultIconColor(GetColor(TEXT)); |
+ icon_id = omnibox_view_->GetVectorIcon(); |
+ security_state::SecurityStateModel::SecurityLevel security_level = |
+ GetToolbarModel()->GetSecurityLevel(false); |
+ icon_color = GetSecureTextColor(security_level); |
Evan Stade
2016/05/12 16:08:11
icon_color = security_level == security_state::Sec
palmer
2016/05/12 21:23:14
Done.
|
+ // The |GetSecureTextColor| is correct for states with 'marked' security |
+ // indicator colors, but to get the final color for the NONE state we need |
+ // to do a bit more work: |
+ if (security_level == security_state::SecurityStateModel::NONE) |
+ icon_color = color_utils::DeriveDefaultIconColor(icon_color); |
} |
location_icon_view_->SetImage( |
gfx::CreateVectorIcon(icon_id, kIconSize, icon_color)); |