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

Side by Side Diff: services/tracing/public/cpp/provider.cc

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: rebase Created 3 years, 11 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 4
5 #include "services/tracing/public/cpp/provider.h" 5 #include "services/tracing/public/cpp/provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 bool)>()); 143 bool)>());
144 } 144 }
145 145
146 void Provider::SendChunk( 146 void Provider::SendChunk(
147 const scoped_refptr<base::RefCountedString>& events_str, 147 const scoped_refptr<base::RefCountedString>& events_str,
148 bool has_more_events) { 148 bool has_more_events) {
149 DCHECK(recorder_); 149 DCHECK(recorder_);
150 // The string will be empty if an error eccured or there were no trace 150 // The string will be empty if an error eccured or there were no trace
151 // events. Empty string is not a valid chunk to record so skip in this case. 151 // events. Empty string is not a valid chunk to record so skip in this case.
152 if (!events_str->data().empty()) { 152 if (!events_str->data().empty()) {
153 recorder_->Record(mojo::String(events_str->data())); 153 recorder_->Record(events_str->data());
154 } 154 }
155 if (!has_more_events) { 155 if (!has_more_events) {
156 recorder_.reset(); 156 recorder_.reset();
157 } 157 }
158 } 158 }
159 159
160 } // namespace tracing 160 } // namespace tracing
OLDNEW
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl ('k') | services/tracing/recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698