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

Unified Diff: chrome/browser/feedback/tracing_manager.cc

Issue 23926004: Fix the output of chrome://slow so that is valid json (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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: chrome/browser/feedback/tracing_manager.cc
diff --git a/chrome/browser/feedback/tracing_manager.cc b/chrome/browser/feedback/tracing_manager.cc
index 6bb446058f31f7cc0760fcf16d287bc91d76dfdc..d4b56daef40bb605a95a0b99513dd45317d4df67 100644
--- a/chrome/browser/feedback/tracing_manager.cc
+++ b/chrome/browser/feedback/tracing_manager.cc
@@ -93,6 +93,8 @@ void TracingManager::OnEndTracingComplete() {
if (!current_trace_id_)
return;
+ data_ = std::string("[") + data_ + "]";
+
std::string output_val;
feedback_util::ZipString(data_, &output_val);
@@ -119,8 +121,11 @@ void TracingManager::OnEndTracingComplete() {
void TracingManager::OnTraceDataCollected(
const scoped_refptr<base::RefCountedString>& trace_fragment) {
- if (current_trace_id_)
+ if (current_trace_id_) {
+ if (!data_.empty())
+ data_ += ",";
data_ += trace_fragment->data();
+ }
}
// static
« 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