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

Unified Diff: components/omnibox/browser/omnibox_view.cc

Issue 1935663002: New origin security indicator icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorten the Views GetSecureTextColor further, thanks to pkasting. Created 4 years, 7 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: components/omnibox/browser/omnibox_view.cc
diff --git a/components/omnibox/browser/omnibox_view.cc b/components/omnibox/browser/omnibox_view.cc
index a4359ced920fc07f9fb808f38a94be31dd567e5b..cc88e37f71a508b48448853bc7f890915e5e3ddc 100644
--- a/components/omnibox/browser/omnibox_view.cc
+++ b/components/omnibox/browser/omnibox_view.cc
@@ -86,23 +86,16 @@ int OmniboxView::GetIcon() const {
return (id == IDR_OMNIBOX_HTTP) ? IDR_LOCATION_BAR_HTTP : id;
}
-gfx::VectorIconId OmniboxView::GetVectorIcon(bool invert) const {
+gfx::VectorIconId OmniboxView::GetVectorIcon() const {
#if !defined(OS_ANDROID) && !defined(OS_IOS)
- if (!IsEditingOrEmpty()) {
- gfx::VectorIconId id = controller_->GetToolbarModel()->GetVectorIcon();
- if (invert) {
- if (id == gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID)
- return gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_INVERT;
- if (id == gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID)
- return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID_INVERT;
- }
- return id;
- }
+ if (!IsEditingOrEmpty())
+ return controller_->GetToolbarModel()->GetVectorIcon();
+
// Reuse the dropdown icons...
gfx::VectorIconId id = AutocompleteMatch::TypeToVectorIcon(
model_ ? model_->CurrentTextType()
: AutocompleteMatchType::URL_WHAT_YOU_TYPED);
- // but use a tweaked version for the HTTP icon.
+ // but use a different version for the HTTP icon.
return (id == gfx::VectorIconId::OMNIBOX_HTTP)
? gfx::VectorIconId::LOCATION_BAR_HTTP
: id;

Powered by Google App Engine
This is Rietveld 408576698