diff options
-rw-r--r-- | chrome/browser/ui/toolbar/toolbar_model_impl.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/views/location_bar/location_icon_view.cc | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc index 2a45e17..f05d9d2 100644 --- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc +++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc @@ -206,6 +206,12 @@ int ToolbarModelImpl::GetIcon() const { chrome::DISPLAY_SEARCH_BUTTON_NEVER) ? IDR_OMNIBOX_SEARCH_SECURED : IDR_OMNIBOX_SEARCH; } + + // When the site chip experiment is running, the icon in the location bar, + // when not the search icon, should be the page icon. + if (chrome::ShouldDisplayOriginChip()) + return GetIconForSecurityLevel(NONE); + return GetIconForSecurityLevel(GetSecurityLevel(false)); } diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc index 0526b6a..4619426 100644 --- a/chrome/browser/ui/views/location_bar/location_icon_view.cc +++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc @@ -5,6 +5,7 @@ #include "chrome/browser/ui/views/location_bar/location_icon_view.h" #include "base/strings/utf_string_conversions.h" +#include "chrome/browser/search/search.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -25,11 +26,13 @@ bool LocationIconView::OnMousePressed(const ui::MouseEvent& event) { } void LocationIconView::OnMouseReleased(const ui::MouseEvent& event) { - page_info_helper_.ProcessEvent(event); + if (chrome::ShouldDisplayOriginChip()) + page_info_helper_.ProcessEvent(event); } void LocationIconView::OnGestureEvent(ui::GestureEvent* event) { - if (event->type() == ui::ET_GESTURE_TAP) { + if (chrome::ShouldDisplayOriginChip() && + (event->type() == ui::ET_GESTURE_TAP)) { page_info_helper_.ProcessEvent(*event); event->SetHandled(); } |