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

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: Merge with master. 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
« no previous file with comments | « content/browser/tracing/trace_message_filter.h ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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::Options options) {
60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 61 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
61 Send(new TracingMsg_BeginTracing(included_categories, 62 Send(new TracingMsg_BeginTracing(included_categories, excluded_categories,
62 excluded_categories, 63 base::TimeTicks::NowFromSystemTraceTime(),
63 base::TimeTicks::NowFromSystemTraceTime())); 64 options));
64 } 65 }
65 66
66 void TraceMessageFilter::SendEndTracing() { 67 void TraceMessageFilter::SendEndTracing() {
67 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 68 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
68 DCHECK(!is_awaiting_end_ack_); 69 DCHECK(!is_awaiting_end_ack_);
69 is_awaiting_end_ack_ = true; 70 is_awaiting_end_ack_ = true;
70 Send(new TracingMsg_EndTracing); 71 Send(new TracingMsg_EndTracing);
71 } 72 }
72 73
73 void TraceMessageFilter::SendGetTraceBufferPercentFull() { 74 void TraceMessageFilter::SendGetTraceBufferPercentFull() {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 if (is_awaiting_buffer_percent_full_ack_) { 120 if (is_awaiting_buffer_percent_full_ack_) {
120 is_awaiting_buffer_percent_full_ack_ = false; 121 is_awaiting_buffer_percent_full_ack_ = false;
121 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply( 122 TraceControllerImpl::GetInstance()->OnTraceBufferPercentFullReply(
122 percent_full); 123 percent_full);
123 } else { 124 } else {
124 NOTREACHED(); 125 NOTREACHED();
125 } 126 }
126 } 127 }
127 128
128 } // namespace content 129 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/trace_message_filter.h ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698