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

Unified Diff: ios/chrome/browser/ui/omnibox/location_bar_view_ios.mm

Issue 2692173002: Update the Bling omnibox to be aware of HTTP_SHOW_WARNING and use ShouldAlwaysShowIcon(). (Closed)
Patch Set: Update the Bling omnibox to be aware of HTTP_SHOW_WARNING and use ShouldAlwaysShowIcon(). Created 3 years, 10 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
« no previous file with comments | « ios/chrome/browser/ui/omnibox/BUILD.gn ('k') | ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/omnibox/location_bar_view_ios.mm
diff --git a/ios/chrome/browser/ui/omnibox/location_bar_view_ios.mm b/ios/chrome/browser/ui/omnibox/location_bar_view_ios.mm
index ae05807ed6461171f91799f674ff35a871eb823d..8f24f4eb89778bde4290710b15d7adcab878a1d1 100644
--- a/ios/chrome/browser/ui/omnibox/location_bar_view_ios.mm
+++ b/ios/chrome/browser/ui/omnibox/location_bar_view_ios.mm
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/strings/string16.h"
#include "components/omnibox/browser/omnibox_edit_model.h"
+#include "components/security_state/core/security_state_ui.h"
#include "components/strings/grit/components_strings.h"
#include "components/toolbar/toolbar_model.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
@@ -169,12 +170,12 @@ void LocationBarViewIOS::OnChanged() {
if (!IsIPadIdiom() && !edit_view_->model()->has_focus()) {
ToolbarModel* toolbarModel = [delegate_ toolbarModel];
if (toolbarModel) {
- bool page_is_secure =
- toolbarModel->GetSecurityLevel(false) != security_state::NONE;
+ bool show_icon_for_state = security_state::ShouldAlwaysShowIcon(
+ toolbarModel->GetSecurityLevel(false));
bool page_has_downgraded_HTTPS =
experimental_flags::IsPageIconForDowngradedHTTPSEnabled() &&
DoesCurrentPageHaveCertInfo(GetWebState());
- if (page_is_secure || page_has_downgraded_HTTPS || page_is_offline) {
+ if (show_icon_for_state || page_has_downgraded_HTTPS || page_is_offline) {
[field_ showPlaceholderImage];
is_showing_placeholder_while_collapsed_ = true;
} else {
« no previous file with comments | « ios/chrome/browser/ui/omnibox/BUILD.gn ('k') | ios/chrome/browser/ui/omnibox/omnibox_view_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698