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 "content/public/app/android_library_loader_hooks.h" | 5 #include "content/public/app/android_library_loader_hooks.h" |
6 | 6 |
7 #include "base/android/base_jni_registrar.h" | 7 #include "base/android/base_jni_registrar.h" |
8 #include "base/android/jni_registrar.h" | 8 #include "base/android/jni_registrar.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 command_line->GetSwitchValueASCII(switches::kTraceStartup)); | 44 command_line->GetSwitchValueASCII(switches::kTraceStartup)); |
45 } | 45 } |
46 | 46 |
47 // Can only use event tracing after setting up the command line. | 47 // Can only use event tracing after setting up the command line. |
48 TRACE_EVENT0("jni", "JNI_OnLoad continuation"); | 48 TRACE_EVENT0("jni", "JNI_OnLoad continuation"); |
49 | 49 |
50 logging::InitLogging(NULL, | 50 logging::InitLogging(NULL, |
51 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, | 51 logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, |
52 logging::DONT_LOCK_LOG_FILE, | 52 logging::DONT_LOCK_LOG_FILE, |
53 logging::DELETE_OLD_LOG_FILE, | 53 logging::DELETE_OLD_LOG_FILE, |
54 logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); | 54 logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); |
55 // To view log output with IDs and timestamps use "adb logcat -v threadtime". | 55 // To view log output with IDs and timestamps use "adb logcat -v threadtime". |
56 logging::SetLogItems(false, // Process ID | 56 logging::SetLogItems(false, // Process ID |
57 false, // Thread ID | 57 false, // Thread ID |
58 false, // Timestamp | 58 false, // Timestamp |
59 false); // Tick count | 59 false); // Tick count |
60 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() | 60 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() |
61 << ", default verbosity = " << logging::GetVlogVerbosity(); | 61 << ", default verbosity = " << logging::GetVlogVerbosity(); |
62 | 62 |
63 if (!base::android::RegisterJni(env)) | 63 if (!base::android::RegisterJni(env)) |
64 return JNI_FALSE; | 64 return JNI_FALSE; |
(...skipping 27 matching lines...) Expand all Loading... |
92 } | 92 } |
93 | 93 |
94 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) { | 94 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) { |
95 // We need the AtExitManager to be created at the very beginning. | 95 // We need the AtExitManager to be created at the very beginning. |
96 g_at_exit_manager = new base::AtExitManager(); | 96 g_at_exit_manager = new base::AtExitManager(); |
97 | 97 |
98 return RegisterNativesImpl(env); | 98 return RegisterNativesImpl(env); |
99 } | 99 } |
100 | 100 |
101 } // namespace content | 101 } // namespace content |
OLD | NEW |