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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java

Issue 2145243002: Revert of [android] Correct the URL scheme colors in the Omnibox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
index 2f57619263a2b229818329f7e059974919a56087..678ac61056b63460cc57ca3f0dbf23c09a49adec 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
@@ -1262,7 +1262,7 @@
mSecurityIconType = securityLevel;
updateSecurityButton(!(securityLevel == ConnectionSecurityLevel.NONE && isSmallDevice));
- // Since we emphasize the scheme of the URL based on the security type, we need to
+ // Since we emphasize the schema of the URL based on the security type, we need to
// refresh the emphasis.
mUrlBar.deEmphasizeUrl();
emphasizeUrl();
@@ -1275,8 +1275,14 @@
@Override
public boolean shouldEmphasizeHttpsScheme() {
- ToolbarDataProvider provider = getToolbarDataProvider();
- if (provider.isUsingBrandColor() || provider.isIncognito()) return false;
+ int securityLevel = getSecurityLevel();
+ if (securityLevel == ConnectionSecurityLevel.SECURITY_ERROR
+ || securityLevel == ConnectionSecurityLevel.SECURITY_WARNING
+ || securityLevel == ConnectionSecurityLevel.SECURITY_POLICY_WARNING) {
+ return true;
+ }
+ if (getToolbarDataProvider().isUsingBrandColor()) return false;
+ if (getToolbarDataProvider().isIncognito()) return false;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698