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

Unified Diff: base/android/locale_utils.cc

Issue 2496183002: Use GetDefaultLocaleListString for returning LocaleList (Closed)
Patch Set: extract setLocale method, since configuration.getLocales() returns the same as LocaleUtils.getDefau… Created 4 years, 1 month 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: base/android/locale_utils.cc
diff --git a/base/android/locale_utils.cc b/base/android/locale_utils.cc
index b3a2346366c0b66936f3927b640a2e5e8dfa3083..a7a7c4bcda0b1f503602f2d51a1888eb573c80e3 100644
--- a/base/android/locale_utils.cc
+++ b/base/android/locale_utils.cc
@@ -23,5 +23,12 @@ std::string GetDefaultLocaleString() {
return ConvertJavaStringToUTF8(locale);
}
+std::string GetDefaultLocaleListString() {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ ScopedJavaLocalRef<jstring> locales =
+ Java_LocaleUtils_getDefaultLocaleListString(env);
+ return ConvertJavaStringToUTF8(locales);
+}
+
} // namespace android
} // namespace base

Powered by Google App Engine
This is Rietveld 408576698