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/command_line_android.h" | 8 #include "base/android/command_line_android.h" |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_registrar.h" | 10 #include "base/android/jni_registrar.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 if (!media::RegisterJni(env)) | 65 if (!media::RegisterJni(env)) |
66 return false; | 66 return false; |
67 | 67 |
68 g_jni_init_done = true; | 68 g_jni_init_done = true; |
69 } | 69 } |
70 | 70 |
71 return true; | 71 return true; |
72 } | 72 } |
73 | 73 |
74 bool LibraryLoaded(JNIEnv* env, jclass clazz, | 74 bool LibraryLoaded(JNIEnv* env, jclass clazz) { |
75 jobjectArray init_command_line) { | |
76 base::android::InitNativeCommandLineFromJavaArray(env, init_command_line); | |
77 | |
78 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 75 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
79 | 76 |
80 if (command_line->HasSwitch(switches::kTraceStartup)) { | 77 if (command_line->HasSwitch(switches::kTraceStartup)) { |
81 base::debug::CategoryFilter category_filter( | 78 base::debug::CategoryFilter category_filter( |
82 command_line->GetSwitchValueASCII(switches::kTraceStartup)); | 79 command_line->GetSwitchValueASCII(switches::kTraceStartup)); |
83 base::debug::TraceLog::GetInstance()->SetEnabled(category_filter, | 80 base::debug::TraceLog::GetInstance()->SetEnabled(category_filter, |
84 base::debug::TraceLog::RECORDING_MODE, | 81 base::debug::TraceLog::RECORDING_MODE, |
85 base::debug::TraceLog::RECORD_UNTIL_FULL); | 82 base::debug::TraceLog::RECORD_UNTIL_FULL); |
86 } | 83 } |
87 | 84 |
(...skipping 15 matching lines...) Expand all Loading... |
103 false, // Thread ID | 100 false, // Thread ID |
104 false, // Timestamp | 101 false, // Timestamp |
105 false); // Tick count | 102 false); // Tick count |
106 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() | 103 VLOG(0) << "Chromium logging enabled: level = " << logging::GetMinLogLevel() |
107 << ", default verbosity = " << logging::GetVlogVerbosity(); | 104 << ", default verbosity = " << logging::GetVlogVerbosity(); |
108 | 105 |
109 return EnsureJniRegistered(env); | 106 return EnsureJniRegistered(env); |
110 } | 107 } |
111 | 108 |
112 } // namespace content | 109 } // namespace content |
OLD | NEW |