OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "content/browser/tracing/tracing_controller_impl.h" | 4 #include "content/browser/tracing/tracing_controller_impl.h" |
5 | 5 |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/files/file_util.h" | 7 #include "base/files/file_util.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 #include "third_party/zlib/zlib.h" | 9 #include "third_party/zlib/zlib.h" |
10 | 10 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 } // namespace | 275 } // namespace |
276 | 276 |
277 scoped_refptr<TracingController::TraceDataSink> | 277 scoped_refptr<TracingController::TraceDataSink> |
278 TracingController::CreateStringSink( | 278 TracingController::CreateStringSink( |
279 const base::Callback<void(base::RefCountedString*)>& callback) { | 279 const base::Callback<void(base::RefCountedString*)>& callback) { |
280 return new StringTraceDataSink(new StringTraceDataEndpoint(callback)); | 280 return new StringTraceDataSink(new StringTraceDataEndpoint(callback)); |
281 } | 281 } |
282 | 282 |
283 scoped_refptr<TracingController::TraceDataSink> | 283 scoped_refptr<TracingController::TraceDataSink> |
| 284 TracingController::CreateStringSink( |
| 285 scoped_refptr<TracingController::TraceDataEndpoint> endpoint) { |
| 286 return new StringTraceDataSink(endpoint); |
| 287 } |
| 288 |
| 289 scoped_refptr<TracingController::TraceDataSink> |
284 TracingController::CreateCompressedStringSink( | 290 TracingController::CreateCompressedStringSink( |
285 scoped_refptr<TracingController::TraceDataEndpoint> endpoint) { | 291 scoped_refptr<TracingController::TraceDataEndpoint> endpoint) { |
286 return new CompressedStringTraceDataSink(endpoint); | 292 return new CompressedStringTraceDataSink(endpoint); |
287 } | 293 } |
288 | 294 |
289 scoped_refptr<TracingController::TraceDataSink> | 295 scoped_refptr<TracingController::TraceDataSink> |
290 TracingController::CreateFileSink(const base::FilePath& file_path, | 296 TracingController::CreateFileSink(const base::FilePath& file_path, |
291 const base::Closure& callback) { | 297 const base::Closure& callback) { |
292 return new StringTraceDataSink( | 298 return new StringTraceDataSink( |
293 CreateFileEndpoint(file_path, callback)); | 299 CreateFileEndpoint(file_path, callback)); |
294 } | 300 } |
295 | 301 |
296 scoped_refptr<TracingController::TraceDataEndpoint> | 302 scoped_refptr<TracingController::TraceDataEndpoint> |
297 TracingController::CreateFileEndpoint(const base::FilePath& file_path, | 303 TracingController::CreateFileEndpoint(const base::FilePath& file_path, |
298 const base::Closure& callback) { | 304 const base::Closure& callback) { |
299 return new FileTraceDataEndpoint(file_path, callback); | 305 return new FileTraceDataEndpoint(file_path, callback); |
300 } | 306 } |
301 | 307 |
302 } // namespace content | 308 } // namespace content |
OLD | NEW |