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

Side by Side Diff: content/app/android/library_loader_hooks.cc

Issue 12302036: Add a mode flag to the tracing framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 7 years, 10 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 | « components/tracing/tracing_messages.h ('k') | content/app/content_main_runner.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 "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 24 matching lines...) Expand all
35 namespace content { 35 namespace content {
36 36
37 static jint LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz, 37 static jint LibraryLoadedOnMainThread(JNIEnv* env, jclass clazz,
38 jobjectArray init_command_line) { 38 jobjectArray init_command_line) {
39 InitNativeCommandLineFromJavaArray(env, init_command_line); 39 InitNativeCommandLineFromJavaArray(env, init_command_line);
40 40
41 CommandLine* command_line = CommandLine::ForCurrentProcess(); 41 CommandLine* command_line = CommandLine::ForCurrentProcess();
42 42
43 if (command_line->HasSwitch(switches::kTraceStartup)) { 43 if (command_line->HasSwitch(switches::kTraceStartup)) {
44 base::debug::TraceLog::GetInstance()->SetEnabled( 44 base::debug::TraceLog::GetInstance()->SetEnabled(
45 command_line->GetSwitchValueASCII(switches::kTraceStartup)); 45 command_line->GetSwitchValueASCII(switches::kTraceStartup),
46 base::debug::TraceLog::RECORD_UNTIL_FULL);
46 } 47 }
47 48
48 // Can only use event tracing after setting up the command line. 49 // Can only use event tracing after setting up the command line.
49 TRACE_EVENT0("jni", "JNI_OnLoad continuation"); 50 TRACE_EVENT0("jni", "JNI_OnLoad continuation");
50 51
51 // Note: because logging is setup here right after copying the command line 52 // Note: because logging is setup here right after copying the command line
52 // array from java to native up top of this method, any code that adds the 53 // array from java to native up top of this method, any code that adds the
53 // --enable-dcheck switch must do so on the Java side. 54 // --enable-dcheck switch must do so on the Java side.
54 logging::DcheckState dcheck_state = 55 logging::DcheckState dcheck_state =
55 command_line->HasSwitch(switches::kEnableDCHECK) ? 56 command_line->HasSwitch(switches::kEnableDCHECK) ?
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 101 }
101 102
102 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) { 103 bool RegisterLibraryLoaderEntryHook(JNIEnv* env) {
103 // We need the AtExitManager to be created at the very beginning. 104 // We need the AtExitManager to be created at the very beginning.
104 g_at_exit_manager = new base::AtExitManager(); 105 g_at_exit_manager = new base::AtExitManager();
105 106
106 return RegisterNativesImpl(env); 107 return RegisterNativesImpl(env);
107 } 108 }
108 109
109 } // namespace content 110 } // namespace content
OLDNEW
« no previous file with comments | « components/tracing/tracing_messages.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698