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

Unified Diff: base/android/java/src/org/chromium/base/LocaleUtils.java

Issue 12598005: [Android] Use generated JNI bindings for locale utils. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | base/android/locale_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java/src/org/chromium/base/LocaleUtils.java
diff --git a/base/android/java/src/org/chromium/base/LocaleUtils.java b/base/android/java/src/org/chromium/base/LocaleUtils.java
index 11c1064768bf387a4a0a83e10690def415efe33b..e57b45ab50e66d266ae47c451268ed8d9a6745fc 100644
--- a/base/android/java/src/org/chromium/base/LocaleUtils.java
+++ b/base/android/java/src/org/chromium/base/LocaleUtils.java
@@ -35,4 +35,14 @@ public class LocaleUtils {
}
return country.isEmpty() ? language : language + "-" + country;
}
+
+ @CalledByNative
+ private static Locale getJavaLocale(String language, String country, String variant) {
+ return new Locale(language, country, variant);
+ }
+
+ @CalledByNative
+ private static String getDisplayNameForLocale(Locale locale, Locale displayLocale) {
+ return locale.getDisplayName(displayLocale);
+ }
}
« no previous file with comments | « no previous file | base/android/locale_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698