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

Side by Side Diff: content/browser/android/tracing_controller_android.cc

Issue 59673007: Android: moves content/ to use long for JNI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/android/tracing_controller_android.h" 5 #include "content/browser/android/tracing_controller_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "content/browser/tracing/trace_subscriber_stdio.h" 13 #include "content/browser/tracing/trace_subscriber_stdio.h"
14 #include "content/public/browser/trace_controller.h" 14 #include "content/public/browser/trace_controller.h"
15 #include "jni/TracingControllerAndroid_jni.h" 15 #include "jni/TracingControllerAndroid_jni.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 static jint Init(JNIEnv* env, jobject obj) { 19 static jlong Init(JNIEnv* env, jobject obj) {
20 TracingControllerAndroid* profiler = new TracingControllerAndroid(env, obj); 20 TracingControllerAndroid* profiler = new TracingControllerAndroid(env, obj);
21 return reinterpret_cast<jint>(profiler); 21 return reinterpret_cast<intptr_t>(profiler);
22 } 22 }
23 23
24 class TracingControllerAndroid::Subscriber 24 class TracingControllerAndroid::Subscriber
25 : public content::TraceSubscriberStdio { 25 : public content::TraceSubscriberStdio {
26 public: 26 public:
27 Subscriber(TracingControllerAndroid* profiler, const base::FilePath& path) 27 Subscriber(TracingControllerAndroid* profiler, const base::FilePath& path)
28 : TraceSubscriberStdio(path, FILE_TYPE_ARRAY, false), 28 : TraceSubscriberStdio(path, FILE_TYPE_ARRAY, false),
29 profiler_(profiler) {} 29 profiler_(profiler) {}
30 30
31 void set_profiler(TracingControllerAndroid* profiler) { 31 void set_profiler(TracingControllerAndroid* profiler) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 static jstring GetDefaultCategories(JNIEnv* env, jobject obj) { 94 static jstring GetDefaultCategories(JNIEnv* env, jobject obj) {
95 return base::android::ConvertUTF8ToJavaString(env, 95 return base::android::ConvertUTF8ToJavaString(env,
96 base::debug::CategoryFilter::kDefaultCategoryFilterString).Release(); 96 base::debug::CategoryFilter::kDefaultCategoryFilterString).Release();
97 } 97 }
98 98
99 bool RegisterTracingControllerAndroid(JNIEnv* env) { 99 bool RegisterTracingControllerAndroid(JNIEnv* env) {
100 return RegisterNativesImpl(env); 100 return RegisterNativesImpl(env);
101 } 101 }
102 102
103 } // namespace content 103 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698