| Index: chrome/android/java_staging/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
|
| diff --git a/chrome/android/java_staging/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java_staging/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
|
| index ca8b5e60850e3927c9d85e4c36a93f289e932cf4..c698df951e724805901dc2e9e9ef09019b786202 100644
|
| --- a/chrome/android/java_staging/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
|
| +++ b/chrome/android/java_staging/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
|
| @@ -85,7 +85,7 @@ import org.chromium.chrome.browser.omnibox.geo.GeolocationHeader;
|
| import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferencesManager;
|
| import org.chromium.chrome.browser.profiles.Profile;
|
| import org.chromium.chrome.browser.search_engines.TemplateUrlService;
|
| -import org.chromium.chrome.browser.ssl.ConnectionSecurityHelperSecurityLevel;
|
| +import org.chromium.chrome.browser.ssl.ConnectionSecurityStatusSecurityLevel;
|
| import org.chromium.chrome.browser.tab.BackgroundContentViewHelper;
|
| import org.chromium.chrome.browser.tab.ChromeTab;
|
| import org.chromium.chrome.browser.toolbar.ToolbarDataProvider;
|
| @@ -675,7 +675,7 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
|
| ? NavigationButtonType.PAGE : NavigationButtonType.EMPTY;
|
|
|
| mSecurityButton = (ImageButton) findViewById(R.id.security_button);
|
| - mSecurityIconType = ConnectionSecurityHelperSecurityLevel.NONE;
|
| + mSecurityIconType = ConnectionSecurityStatusSecurityLevel.NONE;
|
|
|
| mDeleteButton = (TintedImageButton) findViewById(R.id.delete_button);
|
|
|
| @@ -1157,7 +1157,7 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
|
| }
|
|
|
| private int getSecurityLevel() {
|
| - if (getCurrentTab() == null) return ConnectionSecurityHelperSecurityLevel.NONE;
|
| + if (getCurrentTab() == null) return ConnectionSecurityStatusSecurityLevel.NONE;
|
| return getCurrentTab().getSecurityLevel();
|
| }
|
|
|
| @@ -1169,14 +1169,14 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
|
| */
|
| public static int getSecurityIconResource(int securityLevel, boolean usingLightTheme) {
|
| switch (securityLevel) {
|
| - case ConnectionSecurityHelperSecurityLevel.NONE:
|
| + case ConnectionSecurityStatusSecurityLevel.NONE:
|
| return 0;
|
| - case ConnectionSecurityHelperSecurityLevel.SECURITY_WARNING:
|
| + case ConnectionSecurityStatusSecurityLevel.SECURITY_WARNING:
|
| return R.drawable.omnibox_https_warning;
|
| - case ConnectionSecurityHelperSecurityLevel.SECURITY_ERROR:
|
| + case ConnectionSecurityStatusSecurityLevel.SECURITY_ERROR:
|
| return R.drawable.omnibox_https_invalid;
|
| - case ConnectionSecurityHelperSecurityLevel.SECURE:
|
| - case ConnectionSecurityHelperSecurityLevel.EV_SECURE:
|
| + case ConnectionSecurityStatusSecurityLevel.SECURE:
|
| + case ConnectionSecurityStatusSecurityLevel.EV_SECURE:
|
| return usingLightTheme
|
| ? R.drawable.omnibox_https_valid_light : R.drawable.omnibox_https_valid;
|
| default:
|
| @@ -1191,14 +1191,14 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
|
| @Override
|
| public void updateSecurityIcon(int securityLevel) {
|
| if (showingOriginalUrlForPreview()) {
|
| - securityLevel = ConnectionSecurityHelperSecurityLevel.NONE;
|
| + securityLevel = ConnectionSecurityStatusSecurityLevel.NONE;
|
| }
|
| if (mQueryInTheOmnibox) {
|
| - if (securityLevel == ConnectionSecurityHelperSecurityLevel.SECURE
|
| - || securityLevel == ConnectionSecurityHelperSecurityLevel.EV_SECURE) {
|
| - securityLevel = ConnectionSecurityHelperSecurityLevel.NONE;
|
| - } else if (securityLevel == ConnectionSecurityHelperSecurityLevel.SECURITY_WARNING
|
| - || securityLevel == ConnectionSecurityHelperSecurityLevel.SECURITY_ERROR) {
|
| + if (securityLevel == ConnectionSecurityStatusSecurityLevel.SECURE
|
| + || securityLevel == ConnectionSecurityStatusSecurityLevel.EV_SECURE) {
|
| + securityLevel = ConnectionSecurityStatusSecurityLevel.NONE;
|
| + } else if (securityLevel == ConnectionSecurityStatusSecurityLevel.SECURITY_WARNING
|
| + || securityLevel == ConnectionSecurityStatusSecurityLevel.SECURITY_ERROR) {
|
| setUrlToPageUrl();
|
| }
|
| }
|
| @@ -1210,7 +1210,7 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
|
| if (mSecurityIconType == securityLevel) return;
|
| mSecurityIconType = securityLevel;
|
|
|
| - if (securityLevel == ConnectionSecurityHelperSecurityLevel.NONE) {
|
| + if (securityLevel == ConnectionSecurityStatusSecurityLevel.NONE) {
|
| updateSecurityButton(false);
|
| } else {
|
| updateSecurityButton(true);
|
| @@ -1228,9 +1228,9 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
|
| @Override
|
| public boolean shouldEmphasizeHttpsScheme() {
|
| int securityLevel = getSecurityLevel();
|
| - if (securityLevel == ConnectionSecurityHelperSecurityLevel.SECURITY_ERROR
|
| - || securityLevel == ConnectionSecurityHelperSecurityLevel.SECURITY_WARNING
|
| - || securityLevel == ConnectionSecurityHelperSecurityLevel.SECURITY_POLICY_WARNING) {
|
| + if (securityLevel == ConnectionSecurityStatusSecurityLevel.SECURITY_ERROR
|
| + || securityLevel == ConnectionSecurityStatusSecurityLevel.SECURITY_WARNING
|
| + || securityLevel == ConnectionSecurityStatusSecurityLevel.SECURITY_POLICY_WARNING) {
|
| return true;
|
| }
|
| if (getToolbarDataProvider().isUsingBrandColor()) return false;
|
| @@ -1942,9 +1942,8 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener,
|
| boolean showingQuery = false;
|
| String displayText = mToolbarDataProvider.getText();
|
| int securityLevel = getSecurityLevel();
|
| - if (securityLevel != ConnectionSecurityHelperSecurityLevel.SECURITY_ERROR
|
| - && !TextUtils.isEmpty(displayText)
|
| - && mToolbarDataProvider.wouldReplaceURL()) {
|
| + if (securityLevel != ConnectionSecurityStatusSecurityLevel.SECURITY_ERROR
|
| + && !TextUtils.isEmpty(displayText) && mToolbarDataProvider.wouldReplaceURL()) {
|
| url = displayText.trim();
|
| showingQuery = true;
|
| mQueryInTheOmnibox = true;
|
|
|