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

Side by Side Diff: services/debugger/trace_collector.cc

Issue 1151573010: Pull Sky debugger up to services/debugger. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « services/debugger/trace_collector.h ('k') | sky/BUILD.gn » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sky/tools/debugger/trace_collector.h" 5 #include "services/debugger/trace_collector.h"
6 6
7 namespace sky {
8 namespace debugger { 7 namespace debugger {
9 8
10 TraceCollector::TraceCollector(mojo::ScopedDataPipeConsumerHandle source) 9 TraceCollector::TraceCollector(mojo::ScopedDataPipeConsumerHandle source)
11 : drainer_(this, source.Pass()), is_complete_(false) { 10 : drainer_(this, source.Pass()), is_complete_(false) {
12 } 11 }
13 12
14 TraceCollector::~TraceCollector() { 13 TraceCollector::~TraceCollector() {
15 } 14 }
16 15
17 void TraceCollector::GetTrace(TraceCallback callback) { 16 void TraceCollector::GetTrace(TraceCallback callback) {
(...skipping 17 matching lines...) Expand all
35 is_complete_ = true; 34 is_complete_ = true;
36 if (!callback_.is_null()) 35 if (!callback_.is_null())
37 callback_.Run(GetTraceAsString()); 36 callback_.Run(GetTraceAsString());
38 } 37 }
39 38
40 std::string TraceCollector::GetTraceAsString() { 39 std::string TraceCollector::GetTraceAsString() {
41 return std::string(&trace_.front(), trace_.size()); 40 return std::string(&trace_.front(), trace_.size());
42 } 41 }
43 42
44 } // namespace debugger 43 } // namespace debugger
45 } // namespace sky
OLDNEW
« no previous file with comments | « services/debugger/trace_collector.h ('k') | sky/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698