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

Side by Side Diff: content/browser/tracing/tracing_controller_impl_data_sinks.cc

Issue 2161583004: Tracing: re-use JSONTraceDataSink in DevTools' tracing handler... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 5 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
OLDNEW
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 <utility> 4 #include <utility>
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 "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 scoped_refptr<TraceDataEndpoint> endpoint) { 329 scoped_refptr<TraceDataEndpoint> endpoint) {
330 return new JSONTraceDataSink(new CompressedTraceDataEndpoint(endpoint)); 330 return new JSONTraceDataSink(new CompressedTraceDataEndpoint(endpoint));
331 } 331 }
332 332
333 scoped_refptr<TraceDataEndpoint> TracingControllerImpl::CreateCallbackEndpoint( 333 scoped_refptr<TraceDataEndpoint> TracingControllerImpl::CreateCallbackEndpoint(
334 const base::Callback<void(std::unique_ptr<const base::DictionaryValue>, 334 const base::Callback<void(std::unique_ptr<const base::DictionaryValue>,
335 base::RefCountedString*)>& callback) { 335 base::RefCountedString*)>& callback) {
336 return new StringTraceDataEndpoint(callback); 336 return new StringTraceDataEndpoint(callback);
337 } 337 }
338 338
339 scoped_refptr<TracingController::TraceDataSink>
340 TracingControllerImpl::CreateJSONSink(
341 scoped_refptr<TraceDataEndpoint> endpoint) {
342 return new JSONTraceDataSink(endpoint);
343 }
344
339 } // namespace content 345 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698