OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |