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

Unified Diff: services/tracing/trace_data_sink.cc

Issue 962703003: Add using mojo::common::BlockingCopyFromString (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/tracing/trace_data_sink.cc
diff --git a/services/tracing/trace_data_sink.cc b/services/tracing/trace_data_sink.cc
index 088efc376a901c599fef0b29e47d3df7622e182e..1abf43ce0f1b69a8424e6c20dd2f3c14f00dbcc2 100644
--- a/services/tracing/trace_data_sink.cc
+++ b/services/tracing/trace_data_sink.cc
@@ -7,6 +7,8 @@
#include "base/logging.h"
#include "mojo/common/data_pipe_utils.h"
+using mojo::common::BlockingCopyFromString;
+
namespace tracing {
namespace {
@@ -17,7 +19,7 @@ const char kEnd[] = "]}";
TraceDataSink::TraceDataSink(mojo::ScopedDataPipeProducerHandle pipe)
: pipe_(pipe.Pass()), empty_(true) {
- mojo::common::BlockingCopyFromString(kStart, pipe_);
+ BlockingCopyFromString(kStart, pipe_);
}
TraceDataSink::~TraceDataSink() {
@@ -28,13 +30,13 @@ TraceDataSink::~TraceDataSink() {
void TraceDataSink::AddChunk(const std::string& json) {
if (!empty_)
- mojo::common::BlockingCopyFromString(",", pipe_);
+ BlockingCopyFromString(",", pipe_);
empty_ = false;
- mojo::common::BlockingCopyFromString(json, pipe_);
+ BlockingCopyFromString(json, pipe_);
}
void TraceDataSink::Flush() {
- mojo::common::BlockingCopyFromString(kEnd, pipe_);
+ BlockingCopyFromString(kEnd, pipe_);
pipe_.reset();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698