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

Side by Side Diff: chrome/browser/feedback/tracing_manager.cc

Issue 22695004: Attach performance tracing data to feedback reports (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/feedback/feedback_data.cc ('k') | chrome/browser/resources/feedback.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/feedback/tracing_manager.h" 5 #include "chrome/browser/feedback/tracing_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/feedback/feedback_util.h" 10 #include "chrome/browser/feedback/feedback_util.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 base::debug::TraceLog::RECORD_CONTINUOUSLY); 89 base::debug::TraceLog::RECORD_CONTINUOUSLY);
90 } 90 }
91 91
92 void TracingManager::OnEndTracingComplete() { 92 void TracingManager::OnEndTracingComplete() {
93 if (!current_trace_id_) 93 if (!current_trace_id_)
94 return; 94 return;
95 95
96 std::string output_val; 96 std::string output_val;
97 FeedbackUtil::ZipString(data_, &output_val); 97 FeedbackUtil::ZipString(data_, &output_val);
98 98
99 scoped_refptr<base::RefCountedString> output; 99 scoped_refptr<base::RefCountedString> output(
100 output->TakeString(&output_val); 100 base::RefCountedString::TakeString(&output_val));
101 101
102 trace_data_[current_trace_id_] = output; 102 trace_data_[current_trace_id_] = output;
103 103
104 if (!trace_callback_.is_null()) { 104 if (!trace_callback_.is_null()) {
105 trace_callback_.Run(output); 105 trace_callback_.Run(output);
106 trace_callback_.Reset(); 106 trace_callback_.Reset();
107 } 107 }
108 108
109 current_trace_id_ = 0; 109 current_trace_id_ = 0;
110 data_ = ""; 110 data_ = "";
(...skipping 15 matching lines...) Expand all
126 // static 126 // static
127 scoped_ptr<TracingManager> TracingManager::Create() { 127 scoped_ptr<TracingManager> TracingManager::Create() {
128 if (g_tracing_manager) 128 if (g_tracing_manager)
129 return scoped_ptr<TracingManager>(); 129 return scoped_ptr<TracingManager>();
130 return scoped_ptr<TracingManager>(new TracingManager()); 130 return scoped_ptr<TracingManager>(new TracingManager());
131 } 131 }
132 132
133 TracingManager* TracingManager::Get() { 133 TracingManager* TracingManager::Get() {
134 return g_tracing_manager; 134 return g_tracing_manager;
135 } 135 }
OLDNEW
« no previous file with comments | « chrome/browser/feedback/feedback_data.cc ('k') | chrome/browser/resources/feedback.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698