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

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

Issue 1138473003: Revert of Move SecurityLevel into a class of its own (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java
index 9cf8e6994d931bd1532ec33fba9c7fb8d0286d7e..52b65b74728078efc6dcf028b8c66f5303f2ab51 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java
@@ -12,7 +12,7 @@
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.profiles.Profile;
-import org.chromium.chrome.browser.ssl.ConnectionSecurityHelperSecurityLevel;
+import org.chromium.chrome.browser.ui.toolbar.ToolbarModelSecurityLevel;
import java.util.Locale;
@@ -135,7 +135,7 @@
* modified.
* @param resources Resources for the given application context.
* @param profile The profile viewing the given URL.
- * @param securityLevel A valid ConnectionSecurityHelperSecurityLevel for the specified
+ * @param securityLevel A valid ToolbarModelSecurityLevel for the specified
* web contents.
* @param isInternalPage Whether this page is an internal Chrome page.
* @param useDarkColors Whether the text colors should be dark (i.e.
@@ -164,26 +164,25 @@
if (emphasizeResponse.hasScheme()) {
int colorId = nonEmphasizedColorId;
if (!isInternalPage
- && (useDarkColors
- || securityLevel
- == ConnectionSecurityHelperSecurityLevel.SECURITY_ERROR)) {
+ && (useDarkColors || securityLevel
+ == ToolbarModelSecurityLevel.SECURITY_ERROR)) {
switch (securityLevel) {
- case ConnectionSecurityHelperSecurityLevel.NONE:
+ case ToolbarModelSecurityLevel.NONE:
colorId = nonEmphasizedColorId;
break;
- case ConnectionSecurityHelperSecurityLevel.SECURITY_WARNING:
+ case ToolbarModelSecurityLevel.SECURITY_WARNING:
colorId = R.color.url_emphasis_start_scheme_security_warning;
break;
- case ConnectionSecurityHelperSecurityLevel.SECURITY_ERROR:
+ case ToolbarModelSecurityLevel.SECURITY_ERROR:
colorId = R.color.url_emphasis_start_scheme_security_error;
UrlEmphasisSecurityErrorSpan ss = new UrlEmphasisSecurityErrorSpan();
url.setSpan(ss, startSchemeIndex, endSchemeIndex,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
break;
- case ConnectionSecurityHelperSecurityLevel.EV_SECURE:
+ case ToolbarModelSecurityLevel.EV_SECURE:
colorId = R.color.url_emphasis_start_scheme_ev_secure;
break;
- case ConnectionSecurityHelperSecurityLevel.SECURE:
+ case ToolbarModelSecurityLevel.SECURE:
colorId = R.color.url_emphasis_start_scheme_secure;
break;
default:

Powered by Google App Engine
This is Rietveld 408576698