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

Side by Side Diff: testing/android/native_test_launcher.cc

Issue 10224004: Use Android API for GetDisplayNameForLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 8 years, 7 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 | « chrome/browser/autofill/autofill_country.cc ('k') | ui/base/l10n/l10n_util.h » ('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 <stdio.h> 5 #include <stdio.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/locale_utils.h"
9 #include "base/android/path_utils.h" 10 #include "base/android/path_utils.h"
10 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
11 #include "base/at_exit.h" 12 #include "base/at_exit.h"
12 #include "base/command_line.h" 13 #include "base/command_line.h"
13 #include "base/file_path.h" 14 #include "base/file_path.h"
14 #include "base/file_util.h" 15 #include "base/file_util.h"
15 #include "base/logging.h" 16 #include "base/logging.h"
16 #include "base/stringprintf.h" 17 #include "base/stringprintf.h"
17 #include "base/string_tokenizer.h" 18 #include "base/string_tokenizer.h"
18 #include "base/string_util.h" 19 #include "base/string_util.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 logging::DONT_LOCK_LOG_FILE, 144 logging::DONT_LOCK_LOG_FILE,
144 logging::DELETE_OLD_LOG_FILE, 145 logging::DELETE_OLD_LOG_FILE,
145 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); 146 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS);
146 // To view log output with IDs and timestamps use "adb logcat -v threadtime". 147 // To view log output with IDs and timestamps use "adb logcat -v threadtime".
147 logging::SetLogItems(false, // Process ID 148 logging::SetLogItems(false, // Process ID
148 false, // Thread ID 149 false, // Thread ID
149 false, // Timestamp 150 false, // Timestamp
150 false); // Tick count 151 false); // Tick count
151 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() 152 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel()
152 << ", default verbosity = " << logging::GetVlogVerbosity(); 153 << ", default verbosity = " << logging::GetVlogVerbosity();
154 base::android::RegisterLocaleUtils(env);
153 base::android::RegisterPathUtils(env); 155 base::android::RegisterPathUtils(env);
154 } 156 }
155 157
156 } // namespace 158 } // namespace
157 159
158 // This method is called on a separate java thread so that we won't trigger 160 // This method is called on a separate java thread so that we won't trigger
159 // an ANR. 161 // an ANR.
160 static void RunTests(JNIEnv* env, 162 static void RunTests(JNIEnv* env,
161 jobject obj, 163 jobject obj,
162 jstring jfiles_dir, 164 jstring jfiles_dir,
(...skipping 27 matching lines...) Expand all
190 // This is called by the VM when the shared library is first loaded. 192 // This is called by the VM when the shared library is first loaded.
191 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { 193 JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
192 base::android::InitVM(vm); 194 base::android::InitVM(vm);
193 JNIEnv* env = base::android::AttachCurrentThread(); 195 JNIEnv* env = base::android::AttachCurrentThread();
194 if (!RegisterNativesImpl(env)) { 196 if (!RegisterNativesImpl(env)) {
195 return -1; 197 return -1;
196 } 198 }
197 LibraryLoadedOnMainThread(env); 199 LibraryLoadedOnMainThread(env);
198 return JNI_VERSION_1_4; 200 return JNI_VERSION_1_4;
199 } 201 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_country.cc ('k') | ui/base/l10n/l10n_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698