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

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

Issue 23125009: Add support for writing system traces at startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review concerns Created 7 years, 4 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
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/browser/android/tracing_intent_handler.h" 5 #include "content/browser/android/tracing_intent_handler.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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "content/public/browser/trace_controller.h" 11 #include "content/public/browser/trace_controller.h"
12 #include "jni/TracingIntentHandler_jni.h" 12 #include "jni/TracingIntentHandler_jni.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 TracingIntentHandler* g_trace_intent_handler = NULL; 16 TracingIntentHandler* g_trace_intent_handler = NULL;
17 17
18 TracingIntentHandler::TracingIntentHandler(const base::FilePath& path) 18 TracingIntentHandler::TracingIntentHandler(const base::FilePath& path)
19 : TraceSubscriberStdio(path) { 19 : TraceSubscriberStdio(path, FILE_TYPE_ARRAY, false) {
20 TraceController::GetInstance()->BeginTracing( 20 TraceController::GetInstance()->BeginTracing(
21 this, 21 this,
22 std::string("-test*"), 22 std::string("-test*"),
23 base::debug::TraceLog::RECORD_UNTIL_FULL); 23 base::debug::TraceLog::RECORD_UNTIL_FULL);
24 } 24 }
25 25
26 TracingIntentHandler::~TracingIntentHandler() { 26 TracingIntentHandler::~TracingIntentHandler() {
27 } 27 }
28 28
29 void TracingIntentHandler::OnEndTracingComplete() { 29 void TracingIntentHandler::OnEndTracingComplete() {
(...skipping 18 matching lines...) Expand all
48 DCHECK(!g_trace_intent_handler); 48 DCHECK(!g_trace_intent_handler);
49 g_trace_intent_handler->OnEndTracing(); 49 g_trace_intent_handler->OnEndTracing();
50 g_trace_intent_handler = NULL; 50 g_trace_intent_handler = NULL;
51 } 51 }
52 52
53 bool RegisterTracingIntentHandler(JNIEnv* env) { 53 bool RegisterTracingIntentHandler(JNIEnv* env) {
54 return RegisterNativesImpl(env); 54 return RegisterNativesImpl(env);
55 } 55 }
56 56
57 } // namespace content 57 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/tracing/trace_controller_impl.cc » ('j') | content/browser/tracing/trace_subscriber_stdio.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698