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

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

Issue 9694028: Add a Content API around TracingController. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux Created 8 years, 9 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/trace_subscriber_stdio.h" 5 #include "content/browser/trace_subscriber_stdio.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/threading/sequenced_worker_pool.h" 10 #include "base/threading/sequenced_worker_pool.h"
10 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 // All method calls on this class are done on a SequencedWorkerPool thread. 15 // All method calls on this class are done on a SequencedWorkerPool thread.
15 class TraceSubscriberStdioImpl 16 class TraceSubscriberStdioImpl
16 : public base::RefCountedThreadSafe<TraceSubscriberStdioImpl> { 17 : public base::RefCountedThreadSafe<TraceSubscriberStdioImpl> {
17 public: 18 public:
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 90 }
90 91
91 void TraceSubscriberStdio::OnTraceDataCollected( 92 void TraceSubscriberStdio::OnTraceDataCollected(
92 const scoped_refptr<base::RefCountedString>& data_ptr) { 93 const scoped_refptr<base::RefCountedString>& data_ptr) {
93 BrowserThread::PostBlockingPoolSequencedTask( 94 BrowserThread::PostBlockingPoolSequencedTask(
94 __FILE__, FROM_HERE, 95 __FILE__, FROM_HERE,
95 base::Bind(&TraceSubscriberStdioImpl::OnData, impl_.get(), data_ptr)); 96 base::Bind(&TraceSubscriberStdioImpl::OnData, impl_.get(), data_ptr));
96 } 97 }
97 98
98 } // namespace content 99 } // namespace content
99
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698