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

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

Issue 800903004: Resolve lint warnings related to DefaultLocale and SimpleDateFormat (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments incorporated Created 5 years, 11 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillCreditCardEditor.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2e76156062a69f69b95e444974bed7d6493dacfc..6d9033ecf6ab5529ebaab889452fa1ef4e047b9f 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
@@ -14,6 +14,8 @@ import org.chromium.chrome.R;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.ui.toolbar.ToolbarModelSecurityLevel;
+import java.util.Locale;
+
/**
* A helper class that emphasizes the various components of a URL. Useful in the
* Omnibox and Origin Info dialog where different parts of the URL should appear
@@ -287,7 +289,8 @@ public class OmniboxUrlEmphasizer {
int startSchemeIndex = emphasizeResponse.schemeStart;
int endSchemeIndex = emphasizeResponse.schemeStart + emphasizeResponse.schemeLength;
- String scheme = url.subSequence(startSchemeIndex, endSchemeIndex).toString().toLowerCase();
+ String scheme = url.subSequence(startSchemeIndex, endSchemeIndex).toString().toLowerCase(
+ Locale.US);
if (scheme.equals("http") || scheme.equals("https")) {
return emphasizeResponse.hostStart + emphasizeResponse.hostLength;
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillCreditCardEditor.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698