Chromium Code Reviews| Index: chrome/browser/feedback/feedback_data.cc |
| diff --git a/chrome/browser/feedback/feedback_data.cc b/chrome/browser/feedback/feedback_data.cc |
| index cdc2889a9c4835a3207e0a1e87a90822ff482dd5..b4ccfcf2055181ed3dec03c9eb39696133eafa9a 100644 |
| --- a/chrome/browser/feedback/feedback_data.cc |
| +++ b/chrome/browser/feedback/feedback_data.cc |
| @@ -98,36 +98,27 @@ void FeedbackData::OnFeedbackPageDataComplete() { |
| void FeedbackData::set_sys_info( |
|
asargent_no_longer_on_chrome
2013/09/06 22:53:48
style nit: I think the style guide recommends that
rkc
2013/09/06 23:02:17
Yeah, this is just legacy - used to do only one th
|
| scoped_ptr<FeedbackData::SystemLogsMap> sys_info) { |
| - if (sys_info.get()) |
| - CompressSyslogs(sys_info.Pass()); |
| -} |
| - |
| -void FeedbackData::CompressSyslogs( |
| - scoped_ptr<FeedbackData::SystemLogsMap> sys_info) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| - // We get the pointer first since base::Passed will nullify the scoper, hence |
| - // it's not safe to use <scoper>.get() as a parameter to PostTaskAndReply. |
| - FeedbackData::SystemLogsMap* sys_info_ptr = sys_info.get(); |
| - std::string* compressed_logs_ptr = new std::string; |
| - scoped_ptr<std::string> compressed_logs(compressed_logs_ptr); |
| - BrowserThread::PostBlockingPoolTaskAndReply( |
| - FROM_HERE, |
| - base::Bind(&ZipLogs, |
| - sys_info_ptr, |
| - compressed_logs_ptr), |
| - base::Bind(&FeedbackData::OnCompressLogsComplete, |
| - this, |
| - base::Passed(&sys_info), |
| - base::Passed(&compressed_logs))); |
| + sys_info_ = sys_info.Pass(); |
| + if (sys_info_.get()) { |
| + std::string* compressed_logs_ptr = new std::string; |
| + scoped_ptr<std::string> compressed_logs(compressed_logs_ptr); |
| + BrowserThread::PostBlockingPoolTaskAndReply( |
| + FROM_HERE, |
| + base::Bind(&ZipLogs, |
| + sys_info_.get(), |
| + compressed_logs_ptr), |
| + base::Bind(&FeedbackData::OnCompressLogsComplete, |
| + this, |
| + base::Passed(&compressed_logs))); |
| + } |
| } |
| void FeedbackData::OnCompressLogsComplete( |
| - scoped_ptr<FeedbackData::SystemLogsMap> sys_info, |
| scoped_ptr<std::string> compressed_logs) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| - sys_info_ = sys_info.Pass(); |
| compressed_logs_ = compressed_logs.Pass(); |
| syslogs_compression_complete_ = true; |