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

Side by Side Diff: base/android/base_jni_registrar.cc

Issue 874543003: Add support for TraceEvent before the native library is loaded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 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
« no previous file with comments | « no previous file | base/android/early_trace_event.h » ('j') | base/android/early_trace_event.h » ('J')
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 "base/android/base_jni_registrar.h" 5 #include "base/android/base_jni_registrar.h"
6 6
7 #include "base/android/application_status_listener.h" 7 #include "base/android/application_status_listener.h"
8 #include "base/android/build_info.h" 8 #include "base/android/build_info.h"
9 #include "base/android/command_line_android.h" 9 #include "base/android/command_line_android.h"
10 #include "base/android/content_uri_utils.h" 10 #include "base/android/content_uri_utils.h"
11 #include "base/android/cpu_features.h" 11 #include "base/android/cpu_features.h"
12 #include "base/android/early_trace_event.h"
12 #include "base/android/event_log.h" 13 #include "base/android/event_log.h"
13 #include "base/android/field_trial_list.h" 14 #include "base/android/field_trial_list.h"
14 #include "base/android/important_file_writer_android.h" 15 #include "base/android/important_file_writer_android.h"
15 #include "base/android/java_handler_thread.h" 16 #include "base/android/java_handler_thread.h"
16 #include "base/android/jni_android.h" 17 #include "base/android/jni_android.h"
17 #include "base/android/jni_registrar.h" 18 #include "base/android/jni_registrar.h"
18 #include "base/android/jni_utils.h" 19 #include "base/android/jni_utils.h"
19 #include "base/android/locale_utils.h" 20 #include "base/android/locale_utils.h"
20 #include "base/android/memory_pressure_listener_android.h" 21 #include "base/android/memory_pressure_listener_android.h"
21 #include "base/android/path_service_android.h" 22 #include "base/android/path_service_android.h"
(...skipping 10 matching lines...) Expand all
32 namespace base { 33 namespace base {
33 namespace android { 34 namespace android {
34 35
35 static RegistrationMethod kBaseRegisteredMethods[] = { 36 static RegistrationMethod kBaseRegisteredMethods[] = {
36 {"ApplicationStatusListener", 37 {"ApplicationStatusListener",
37 base::android::ApplicationStatusListener::RegisterBindings}, 38 base::android::ApplicationStatusListener::RegisterBindings},
38 {"BuildInfo", base::android::BuildInfo::RegisterBindings}, 39 {"BuildInfo", base::android::BuildInfo::RegisterBindings},
39 {"CommandLine", base::android::RegisterCommandLine}, 40 {"CommandLine", base::android::RegisterCommandLine},
40 {"ContentUriUtils", base::RegisterContentUriUtils}, 41 {"ContentUriUtils", base::RegisterContentUriUtils},
41 {"CpuFeatures", base::android::RegisterCpuFeatures}, 42 {"CpuFeatures", base::android::RegisterCpuFeatures},
43 { "EarlyTraceEvent", base::android::RegisterEarlyTraceEvent },
dsinclair 2015/02/09 21:11:20 nit: looks like the spacing is off here relative t
Benoit L 2015/02/10 15:31:35 Done.
42 {"EventLog", base::android::RegisterEventLog}, 44 {"EventLog", base::android::RegisterEventLog},
43 {"FieldTrialList", base::android::RegisterFieldTrialList}, 45 {"FieldTrialList", base::android::RegisterFieldTrialList},
44 {"ImportantFileWriterAndroid", 46 {"ImportantFileWriterAndroid",
45 base::android::RegisterImportantFileWriterAndroid}, 47 base::android::RegisterImportantFileWriterAndroid},
46 {"JNIUtils", base::android::RegisterJNIUtils}, 48 {"JNIUtils", base::android::RegisterJNIUtils},
47 {"LocaleUtils", base::android::RegisterLocaleUtils}, 49 {"LocaleUtils", base::android::RegisterLocaleUtils},
48 {"MemoryPressureListenerAndroid", 50 {"MemoryPressureListenerAndroid",
49 base::android::MemoryPressureListenerAndroid::Register}, 51 base::android::MemoryPressureListenerAndroid::Register},
50 {"JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings}, 52 {"JavaHandlerThread", base::android::JavaHandlerThread::RegisterBindings},
51 {"PathService", base::android::RegisterPathService}, 53 {"PathService", base::android::RegisterPathService},
52 {"PathUtils", base::android::RegisterPathUtils}, 54 {"PathUtils", base::android::RegisterPathUtils},
53 {"PowerMonitor", base::RegisterPowerMonitor}, 55 {"PowerMonitor", base::RegisterPowerMonitor},
54 {"RecordHistogram", base::android::RegisterRecordHistogram}, 56 {"RecordHistogram", base::android::RegisterRecordHistogram},
55 {"SystemMessageHandler", base::MessagePumpForUI::RegisterBindings}, 57 {"SystemMessageHandler", base::MessagePumpForUI::RegisterBindings},
56 {"SysUtils", base::android::SysUtils::Register}, 58 {"SysUtils", base::android::SysUtils::Register},
57 {"ThreadUtils", base::RegisterThreadUtils}, 59 {"ThreadUtils", base::RegisterThreadUtils},
58 {"TraceEvent", base::android::RegisterTraceEvent}, 60 {"TraceEvent", base::android::RegisterTraceEvent},
59 }; 61 };
60 62
61 bool RegisterJni(JNIEnv* env) { 63 bool RegisterJni(JNIEnv* env) {
62 TRACE_EVENT0("startup", "base_android::RegisterJni"); 64 TRACE_EVENT0("startup", "base_android::RegisterJni");
63 return RegisterNativeMethods(env, kBaseRegisteredMethods, 65 return RegisterNativeMethods(env, kBaseRegisteredMethods,
64 arraysize(kBaseRegisteredMethods)); 66 arraysize(kBaseRegisteredMethods));
65 } 67 }
66 68
67 } // namespace android 69 } // namespace android
68 } // namespace base 70 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/android/early_trace_event.h » ('j') | base/android/early_trace_event.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698