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

Side by Side Diff: content/browser/tracing/trace_message_filter.cc

Issue 12302036: Add a mode flag to the tracing framework. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TraceMode conversion to/from strings. Created 7 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 | 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/tracing/trace_message_filter.h" 5 #include "content/browser/tracing/trace_message_filter.h"
6 6
7 #include "components/tracing/tracing_messages.h" 7 #include "components/tracing/tracing_messages.h"
8 #include "content/browser/tracing/trace_controller_impl.h" 8 #include "content/browser/tracing/trace_controller_impl.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 OnTraceNotification) 49 OnTraceNotification)
50 IPC_MESSAGE_HANDLER(TracingHostMsg_TraceBufferPercentFullReply, 50 IPC_MESSAGE_HANDLER(TracingHostMsg_TraceBufferPercentFullReply,
51 OnTraceBufferPercentFullReply) 51 OnTraceBufferPercentFullReply)
52 IPC_MESSAGE_UNHANDLED(handled = false) 52 IPC_MESSAGE_UNHANDLED(handled = false)
53 IPC_END_MESSAGE_MAP_EX() 53 IPC_END_MESSAGE_MAP_EX()
54 return handled; 54 return handled;
55 } 55 }
56 56
57 void TraceMessageFilter::SendBeginTracing( 57 void TraceMessageFilter::SendBeginTracing(
58 const std::vector<std::string>& included_categories, 58 const std::vector<std::string>& included_categories,
59 const std::vector<std::string>& excluded_categories) { 59 const std::vector<std::string>& excluded_categories,
60 base::debug::TraceLog::TraceMode mode) {
60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
61 Send(new TracingMsg_BeginTracing(included_categories, 62 Send(new TracingMsg_BeginTracing(
62 excluded_categories, 63 included_categories,
63 base::TimeTicks::NowFromSystemTraceTime())); 64 excluded_categories,
65 base::TimeTicks::NowFromSystemTraceTime(),
66 base::debug::TraceLog::StringFromTraceMode(mode)));
64 } 67 }
65 68
66 void TraceMessageFilter::SendEndTracing() { 69 void TraceMessageFilter::SendEndTracing() {
67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 70 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
68 DCHECK(!is_awaiting_end_ack_); 71 DCHECK(!is_awaiting_end_ack_);
69 is_awaiting_end_ack_ = true; 72 is_awaiting_end_ack_ = true;
70 Send(new TracingMsg_EndTracing); 73 Send(new TracingMsg_EndTracing);
71 } 74 }
72 75
73 void TraceMessageFilter::SendGetTraceBufferPercentFull() { 76 void TraceMessageFilter::SendGetTraceBufferPercentFull() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (is_awaiting_buffer_percent_full_ack_) { 122 if (is_awaiting_buffer_percent_full_ack_) {
120 is_awaiting_buffer_percent_full_ack_ = false; 123 is_awaiting_buffer_percent_full_ack_ = false;
121 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( 124 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply(
122 percent_full); 125 percent_full);
123 } else { 126 } else {
124 NOTREACHED(); 127 NOTREACHED();
125 } 128 }
126 } 129 }
127 130
128 } // namespace content 131 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698