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

Unified Diff: components/feedback/feedback_data.cc

Issue 2217163003: Clean up and modernize the feedback code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actual Fix Created 4 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 side-by-side diff with in-line comments
Download patch
« components/feedback/feedback_data.h ('K') | « components/feedback/feedback_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/feedback/feedback_data.cc
diff --git a/components/feedback/feedback_data.cc b/components/feedback/feedback_data.cc
index f465f6c4ebba91aaf2827fd4fb72c697eff35e20..215e07dce6cb99abc6fd10e5769cd2bee6a17d9a 100644
--- a/components/feedback/feedback_data.cc
+++ b/components/feedback/feedback_data.cc
@@ -60,12 +60,11 @@ void FeedbackData::SetAndCompressSystemInfo(
}
}
- if (sys_info.get()) {
+ if (sys_info) {
++pending_op_count_;
AddLogs(std::move(sys_info));
BrowserThread::PostBlockingPoolTaskAndReply(
- FROM_HERE,
- base::Bind(&FeedbackCommon::CompressLogs, this),
+ FROM_HERE, base::Bind(&FeedbackData::CompressLogs, this),
base::Bind(&FeedbackData::OnCompressComplete, this));
}
}
@@ -74,15 +73,13 @@ void FeedbackData::SetAndCompressHistograms(
std::unique_ptr<std::string> histograms) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (!histograms.get())
+ if (!histograms)
return;
++pending_op_count_;
BrowserThread::PostBlockingPoolTaskAndReply(
FROM_HERE,
- base::Bind(&FeedbackCommon::CompressFile,
- this,
- base::FilePath(kHistogramsFilename),
- kHistogramsAttachmentName,
+ base::Bind(&FeedbackData::CompressFile, this,
+ base::FilePath(kHistogramsFilename), kHistogramsAttachmentName,
base::Passed(&histograms)),
base::Bind(&FeedbackData::OnCompressComplete, this));
}
@@ -91,18 +88,14 @@ void FeedbackData::AttachAndCompressFileData(
std::unique_ptr<std::string> attached_filedata) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (!attached_filedata.get() || attached_filedata->empty())
+ if (!attached_filedata || attached_filedata->empty())
return;
++pending_op_count_;
base::FilePath attached_file =
base::FilePath::FromUTF8Unsafe(attached_filename_);
BrowserThread::PostBlockingPoolTaskAndReply(
- FROM_HERE,
- base::Bind(&FeedbackCommon::CompressFile,
- this,
- attached_file,
- std::string(),
- base::Passed(&attached_filedata)),
+ FROM_HERE, base::Bind(&FeedbackData::CompressFile, this, attached_file,
+ std::string(), base::Passed(&attached_filedata)),
base::Bind(&FeedbackData::OnCompressComplete, this));
}
« components/feedback/feedback_data.h ('K') | « components/feedback/feedback_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698