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

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

Issue 9443020: Use SequencedWorkerPool for disk operations in TraceSubscriberStdio. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
« no previous file with comments | « content/browser/trace_controller.cc ('k') | content/browser/trace_subscriber_stdio.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/trace_message_filter.h" 5 #include "content/browser/trace_message_filter.h"
6 6
7 #include "content/browser/trace_controller.h" 7 #include "content/browser/trace_controller.h"
8 #include "content/common/child_process_messages.h" 8 #include "content/common/child_process_messages.h"
9 9
10 using content::BrowserMessageFilter; 10 using content::BrowserMessageFilter;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 const std::vector<std::string>& known_categories) { 89 const std::vector<std::string>& known_categories) {
90 // is_awaiting_end_ack_ should always be true here, but check in case the 90 // is_awaiting_end_ack_ should always be true here, but check in case the
91 // child process is compromised. 91 // child process is compromised.
92 if (is_awaiting_end_ack_) { 92 if (is_awaiting_end_ack_) {
93 is_awaiting_end_ack_ = false; 93 is_awaiting_end_ack_ = false;
94 TraceController::GetInstance()->OnEndTracingAck(known_categories); 94 TraceController::GetInstance()->OnEndTracingAck(known_categories);
95 } 95 }
96 } 96 }
97 97
98 void TraceMessageFilter::OnTraceDataCollected(const std::string& data) { 98 void TraceMessageFilter::OnTraceDataCollected(const std::string& data) {
99 TraceController::GetInstance()->OnTraceDataCollected( 99 scoped_refptr<base::RefCountedString> data_ptr(new base::RefCountedString());
100 make_scoped_refptr(new base::debug::TraceLog::RefCountedString(data))); 100 data_ptr->data() = data;
101 TraceController::GetInstance()->OnTraceDataCollected(data_ptr);
101 } 102 }
102 103
103 void TraceMessageFilter::OnTraceBufferFull() { 104 void TraceMessageFilter::OnTraceBufferFull() {
104 TraceController::GetInstance()->OnTraceBufferFull(); 105 TraceController::GetInstance()->OnTraceBufferFull();
105 } 106 }
106 107
107 void TraceMessageFilter::OnTraceBufferPercentFullReply(float percent_full) { 108 void TraceMessageFilter::OnTraceBufferPercentFullReply(float percent_full) {
108 if (is_awaiting_bpf_ack_) { 109 if (is_awaiting_bpf_ack_) {
109 is_awaiting_bpf_ack_ = false; 110 is_awaiting_bpf_ack_ = false;
110 TraceController::GetInstance()->OnTraceBufferPercentFullReply( 111 TraceController::GetInstance()->OnTraceBufferPercentFullReply(
111 percent_full); 112 percent_full);
112 } 113 }
113 } 114 }
114 115
OLDNEW
« no previous file with comments | « content/browser/trace_controller.cc ('k') | content/browser/trace_subscriber_stdio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698