OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/feedback/feedback_data.h" | 5 #include "components/feedback/feedback_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/json/json_string_value_serializer.h" | 9 #include "base/json/json_string_value_serializer.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 ++pending_op_count_; | 51 ++pending_op_count_; |
52 if (!manager || | 52 if (!manager || |
53 !manager->GetTraceData( | 53 !manager->GetTraceData( |
54 trace_id_, | 54 trace_id_, |
55 base::Bind(&FeedbackData::OnGetTraceData, this, trace_id_))) { | 55 base::Bind(&FeedbackData::OnGetTraceData, this, trace_id_))) { |
56 pending_op_count_--; | 56 pending_op_count_--; |
57 trace_id_ = 0; | 57 trace_id_ = 0; |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 AddLogs(sys_info.Pass()); | |
62 if (sys_info.get()) { | 61 if (sys_info.get()) { |
63 ++pending_op_count_; | 62 ++pending_op_count_; |
| 63 AddLogs(sys_info.Pass()); |
64 BrowserThread::PostBlockingPoolTaskAndReply( | 64 BrowserThread::PostBlockingPoolTaskAndReply( |
65 FROM_HERE, | 65 FROM_HERE, |
66 base::Bind(&FeedbackCommon::CompressLogs, this), | 66 base::Bind(&FeedbackCommon::CompressLogs, this), |
67 base::Bind(&FeedbackData::OnCompressComplete, this)); | 67 base::Bind(&FeedbackData::OnCompressComplete, this)); |
68 } | 68 } |
69 } | 69 } |
70 | 70 |
71 void FeedbackData::SetAndCompressHistograms( | 71 void FeedbackData::SetAndCompressHistograms( |
72 scoped_ptr<std::string> histograms) { | 72 scoped_ptr<std::string> histograms) { |
73 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 73 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 void FeedbackData::SendReport() { | 139 void FeedbackData::SendReport() { |
140 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 140 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
141 if (IsDataComplete() && !report_sent_) { | 141 if (IsDataComplete() && !report_sent_) { |
142 report_sent_ = true; | 142 report_sent_ = true; |
143 send_report_.Run(this); | 143 send_report_.Run(this); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 } // namespace feedback | 147 } // namespace feedback |
OLD | NEW |