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

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

Issue 131553003: Move Android TraceEvent interface to base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put back content version of TraceEvent*.java as wrappers to ease cross repository commit Created 6 years, 11 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
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/common/android/trace_event_binding.h" 5 #include "base/android/trace_event_binding.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include <set> 9 #include <set>
10 10
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "jni/TraceEvent_jni.h" 13 #include "jni/TraceEvent_jni.h"
14 14
15 namespace base {
16 namespace android {
17
15 namespace { 18 namespace {
16 19
17 const char kJavaCategory[] = "Java"; 20 const char kJavaCategory[] = "Java";
18 21
19 // Boilerplate for safely converting Java data to TRACE_EVENT data. 22 // Boilerplate for safely converting Java data to TRACE_EVENT data.
20 class TraceEventDataConverter { 23 class TraceEventDataConverter {
21 public: 24 public:
22 TraceEventDataConverter(JNIEnv* env, 25 TraceEventDataConverter(JNIEnv* env,
23 jstring jname, 26 jstring jname,
24 jstring jarg) 27 jstring jarg)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } else { 129 } else {
127 TRACE_EVENT_COPY_ASYNC_END0(kJavaCategory, 130 TRACE_EVENT_COPY_ASYNC_END0(kJavaCategory,
128 converter.name(), 131 converter.name(),
129 jid); 132 jid);
130 } 133 }
131 } 134 }
132 135
133 bool RegisterTraceEvent(JNIEnv* env) { 136 bool RegisterTraceEvent(JNIEnv* env) {
134 return RegisterNativesImpl(env); 137 return RegisterNativesImpl(env);
135 } 138 }
139
140 } // namespace android
141 } // namespace base
OLDNEW
« no previous file with comments | « base/android/trace_event_binding.h ('k') | base/base.gyp » ('j') | base/base.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698