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

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

Issue 2346063002: Add new SecurityLevel for Http Bad state (Closed)
Patch Set: Improve comment Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.omnibox; 5 package org.chromium.chrome.browser.omnibox;
6 6
7 import static org.chromium.chrome.browser.toolbar.ToolbarPhone.URL_FOCUS_CHANGE_ ANIMATION_DURATION_MS; 7 import static org.chromium.chrome.browser.toolbar.ToolbarPhone.URL_FOCUS_CHANGE_ ANIMATION_DURATION_MS;
8 8
9 import android.Manifest; 9 import android.Manifest;
10 import android.animation.Animator; 10 import android.animation.Animator;
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 /** 1216 /**
1217 * Determines the icon that should be displayed for the current security lev el. 1217 * Determines the icon that should be displayed for the current security lev el.
1218 * @param securityLevel The security level for which the resource will be re turned. 1218 * @param securityLevel The security level for which the resource will be re turned.
1219 * @param isSmallDevice Whether the device form factor is small (like a phon e) or large 1219 * @param isSmallDevice Whether the device form factor is small (like a phon e) or large
1220 * (like a tablet). 1220 * (like a tablet).
1221 * @return The resource ID of the icon that should be displayed, 0 if no ico n should show. 1221 * @return The resource ID of the icon that should be displayed, 0 if no ico n should show.
1222 */ 1222 */
1223 public static int getSecurityIconResource(int securityLevel, boolean isSmall Device) { 1223 public static int getSecurityIconResource(int securityLevel, boolean isSmall Device) {
1224 switch (securityLevel) { 1224 switch (securityLevel) {
1225 case ConnectionSecurityLevel.NONE: 1225 case ConnectionSecurityLevel.NONE:
1226 case ConnectionSecurityLevel.HTTP_WARNING:
1226 return isSmallDevice ? 0 : R.drawable.omnibox_info; 1227 return isSmallDevice ? 0 : R.drawable.omnibox_info;
1227 case ConnectionSecurityLevel.SECURITY_WARNING: 1228 case ConnectionSecurityLevel.SECURITY_WARNING:
1228 return R.drawable.omnibox_info; 1229 return R.drawable.omnibox_info;
1229 case ConnectionSecurityLevel.SECURITY_ERROR: 1230 case ConnectionSecurityLevel.SECURITY_ERROR:
1230 return R.drawable.omnibox_https_invalid; 1231 return R.drawable.omnibox_https_invalid;
1231 case ConnectionSecurityLevel.SECURE: 1232 case ConnectionSecurityLevel.SECURE:
1232 case ConnectionSecurityLevel.EV_SECURE: 1233 case ConnectionSecurityLevel.EV_SECURE:
1233 return R.drawable.omnibox_https_valid; 1234 return R.drawable.omnibox_https_valid;
1234 default: 1235 default:
1235 assert false; 1236 assert false;
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2459 public View getContainerView() { 2460 public View getContainerView() {
2460 return this; 2461 return this;
2461 } 2462 }
2462 2463
2463 @Override 2464 @Override
2464 public void setTitleToPageTitle() { } 2465 public void setTitleToPageTitle() { }
2465 2466
2466 @Override 2467 @Override
2467 public void setShowTitle(boolean showTitle) { } 2468 public void setShowTitle(boolean showTitle) { }
2468 } 2469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698