Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
index 232425595c279a63cf8d8db6a3bb6d8310597f78..30898ddedc0e1cb1ea1cf5733cde46890fc9e46e 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc |
@@ -570,11 +570,16 @@ void OmniboxViewViews::SetEmphasis(bool emphasize, const gfx::Range& range) { |
void OmniboxViewViews::UpdateSchemeStyle(const gfx::Range& range) { |
DCHECK(range.IsValid()); |
- const SkColor security_color = |
- location_bar_view_->GetSecureTextColor(security_level_); |
- const bool strike = security_level_ == security_state::DANGEROUS; |
- ApplyColor(security_color, range); |
- ApplyStyle(gfx::DIAGONAL_STRIKE, strike, range); |
+ // Only SECURE and DANGEROUS levels (pages served over HTTPS or flagged by |
+ // SafeBrowsing) get a special scheme color treatment. If the security level |
+ // is NONE or HTTP_SHOW_WARNING, we do not override the text style previously |
+ // applied to the scheme text range by SetEmphasis(). |
+ if (security_level_ == security_state::NONE || |
+ security_level_ == security_state::HTTP_SHOW_WARNING) |
Peter Kasting
2017/03/09 06:02:42
The addition of HTTP_SHOW_WARNING here is a views
|
+ return; |
+ ApplyColor(location_bar_view_->GetSecureTextColor(security_level_), range); |
+ if (security_level_ == security_state::DANGEROUS) |
+ ApplyStyle(gfx::DIAGONAL_STRIKE, true, range); |
} |
void OmniboxViewViews::EmphasizeURLComponents() { |