OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/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 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 jstring jname_; | 50 jstring jname_; |
51 jstring jarg_; | 51 jstring jarg_; |
52 const char* name_; | 52 const char* name_; |
53 const char* arg_; | 53 const char* arg_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(TraceEventDataConverter); | 55 DISALLOW_COPY_AND_ASSIGN(TraceEventDataConverter); |
56 }; | 56 }; |
57 | 57 |
58 class TraceEnabledObserver : public debug::TraceLog::EnabledStateObserver { | 58 class TraceEnabledObserver : public debug::TraceLog::EnabledStateObserver { |
59 public: | 59 public: |
60 virtual void OnTraceLogEnabled() OVERRIDE { | 60 void OnTraceLogEnabled() override { |
Mostyn Bramley-Moore
2014/09/30 22:43:58
incorrect indentation here
| |
61 JNIEnv* env = base::android::AttachCurrentThread(); | 61 JNIEnv* env = base::android::AttachCurrentThread(); |
62 base::android::Java_TraceEvent_setEnabled(env, true); | 62 base::android::Java_TraceEvent_setEnabled(env, true); |
63 } | 63 } |
64 virtual void OnTraceLogDisabled() OVERRIDE { | 64 void OnTraceLogDisabled() override { |
65 JNIEnv* env = base::android::AttachCurrentThread(); | 65 JNIEnv* env = base::android::AttachCurrentThread(); |
66 base::android::Java_TraceEvent_setEnabled(env, false); | 66 base::android::Java_TraceEvent_setEnabled(env, false); |
67 } | 67 } |
68 }; | 68 }; |
69 | 69 |
70 base::LazyInstance<TraceEnabledObserver>::Leaky g_trace_enabled_state_observer_; | 70 base::LazyInstance<TraceEnabledObserver>::Leaky g_trace_enabled_state_observer_; |
71 | 71 |
72 } // namespace | 72 } // namespace |
73 | 73 |
74 static void RegisterEnabledObserver(JNIEnv* env, jclass clazz) { | 74 static void RegisterEnabledObserver(JNIEnv* env, jclass clazz) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 jid); | 160 jid); |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 bool RegisterTraceEvent(JNIEnv* env) { | 164 bool RegisterTraceEvent(JNIEnv* env) { |
165 return RegisterNativesImpl(env); | 165 return RegisterNativesImpl(env); |
166 } | 166 } |
167 | 167 |
168 } // namespace android | 168 } // namespace android |
169 } // namespace base | 169 } // namespace base |
OLD | NEW |