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

Side by Side Diff: base/android/locale_utils.cc

Issue 10798010: Uses gyp "rules" rather than "actions" templates for the JNI generator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo on content_jni.gypi Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « base/android/jni_generator/sample_for_tests.cc ('k') | base/android/path_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/android/locale_utils.h" 5 #include "base/android/locale_utils.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "jni/locale_utils_jni.h" 12 #include "jni/LocaleUtils_jni.h"
13 #include "unicode/uloc.h" 13 #include "unicode/uloc.h"
14 14
15 namespace base { 15 namespace base {
16 namespace android { 16 namespace android {
17 17
18 std::string GetDefaultLocale() { 18 std::string GetDefaultLocale() {
19 JNIEnv* env = AttachCurrentThread(); 19 JNIEnv* env = AttachCurrentThread();
20 ScopedJavaLocalRef<jstring> locale = Java_LocaleUtils_getDefaultLocale(env); 20 ScopedJavaLocalRef<jstring> locale = Java_LocaleUtils_getDefaultLocale(env);
21 return ConvertJavaStringToUTF8(locale); 21 return ConvertJavaStringToUTF8(locale);
22 } 22 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 java_display_locale.obj()))); 85 java_display_locale.obj())));
86 return ConvertJavaStringToUTF16(java_result); 86 return ConvertJavaStringToUTF16(java_result);
87 } 87 }
88 88
89 bool RegisterLocaleUtils(JNIEnv* env) { 89 bool RegisterLocaleUtils(JNIEnv* env) {
90 return RegisterNativesImpl(env); 90 return RegisterNativesImpl(env);
91 } 91 }
92 92
93 } // namespace android 93 } // namespace android
94 } // namespace base 94 } // namespace base
OLDNEW
« no previous file with comments | « base/android/jni_generator/sample_for_tests.cc ('k') | base/android/path_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698