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

Unified Diff: chrome/browser/feedback/feedback_uploader.h

Issue 133193004: Revert of Cache feedback reports to disk in case of send failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « chrome/browser/feedback/feedback_report.cc ('k') | chrome/browser/feedback/feedback_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/feedback/feedback_uploader.h
diff --git a/chrome/browser/feedback/feedback_uploader.h b/chrome/browser/feedback/feedback_uploader.h
index 9ddf3a053ebbe3c1fb124c3c21104abecfa6d2b9..5c31047b1664f102d152805f42545d9252ce40ab 100644
--- a/chrome/browser/feedback/feedback_uploader.h
+++ b/chrome/browser/feedback/feedback_uploader.h
@@ -22,7 +22,7 @@
namespace feedback {
-class FeedbackReport;
+struct FeedbackReport;
// FeedbackUploader is used to add a feedback report to the queue of reports
// being uploaded. In case uploading a report fails, it is written to disk and
@@ -33,27 +33,22 @@
explicit FeedbackUploader(content::BrowserContext* context);
virtual ~FeedbackUploader();
- // Queues a report for uploading.
- void QueueReport(const std::string& data);
+ void QueueReport(scoped_ptr<std::string> data);
private:
friend class FeedbackUploaderTest;
struct ReportsUploadTimeComparator {
- bool operator()(FeedbackReport* a, FeedbackReport* b) const;
+ bool operator()(const FeedbackReport& a, const FeedbackReport& b) const;
};
// Dispatches the report to be uploaded.
- void DispatchReport(const std::string& data);
-
- // Loads any unsent reports from disk and queues them to be uploaded in
- // the given browser context.
- void QueueUnsentReports(content::BrowserContext* context);
+ void DispatchReport(scoped_ptr<std::string> data);
// Update our timer for uploading the next report.
void UpdateUploadTimer();
// Requeue this report with a delay.
- void RetryReport(const std::string& data);
+ void RetryReport(scoped_ptr<std::string> data);
void setup_for_test(const ReportDataCallback& dispatch_callback,
const base::TimeDelta& retry_delay);
@@ -64,9 +59,11 @@
base::OneShotTimer<FeedbackUploader> upload_timer_;
// Priority queue of reports prioritized by the time the report is supposed
// to be uploaded at.
- std::priority_queue<scoped_refptr<FeedbackReport>,
- std::vector<scoped_refptr<FeedbackReport> >,
+ std::priority_queue<FeedbackReport,
+ std::vector<FeedbackReport>,
ReportsUploadTimeComparator> reports_queue_;
+
+ std::vector<FeedbackReport> loaded_reports_;
ReportDataCallback dispatch_callback_;
base::TimeDelta retry_delay_;
« no previous file with comments | « chrome/browser/feedback/feedback_report.cc ('k') | chrome/browser/feedback/feedback_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698