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

Side by Side Diff: chrome/browser/feedback/feedback_report.h

Issue 186903003: Merge 254314 "Fix race condition in uploading feedback reports." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 9 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
OLDNEW
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 #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_ 5 #ifndef CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_
6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_ 6 #define CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 25 matching lines...) Expand all
36 36
37 // Stops the disk write of the report and deletes the report file if already 37 // Stops the disk write of the report and deletes the report file if already
38 // written. 38 // written.
39 void DeleteReportOnDisk(); 39 void DeleteReportOnDisk();
40 40
41 const base::Time& upload_at() const { return upload_at_; } 41 const base::Time& upload_at() const { return upload_at_; }
42 const std::string& data() const { return data_; } 42 const std::string& data() const { return data_; }
43 43
44 // Loads the reports still on disk and queues then using the given callback. 44 // Loads the reports still on disk and queues then using the given callback.
45 // This call blocks on the file reads. 45 // This call blocks on the file reads.
46 static void LoadReportsAndQueue(content::BrowserContext* context, 46 static void LoadReportsAndQueue(const base::FilePath& user_dir,
47 QueueCallback callback); 47 QueueCallback callback);
48 48
49 private: 49 private:
50 friend class base::RefCounted<FeedbackReport>; 50 friend class base::RefCounted<FeedbackReport>;
51 virtual ~FeedbackReport(); 51 virtual ~FeedbackReport();
52 52
53 // Name of the file corresponding to this report. 53 // Name of the file corresponding to this report.
54 base::FilePath file_; 54 base::FilePath file_;
55 55
56 base::FilePath reports_path_; 56 base::FilePath reports_path_;
57 base::Time upload_at_; // Upload this report at or after this time. 57 base::Time upload_at_; // Upload this report at or after this time.
58 std::string data_; 58 std::string data_;
59 59
60 scoped_refptr<base::SequencedTaskRunner> reports_task_runner_; 60 scoped_refptr<base::SequencedTaskRunner> reports_task_runner_;
61 61
62 DISALLOW_COPY_AND_ASSIGN(FeedbackReport); 62 DISALLOW_COPY_AND_ASSIGN(FeedbackReport);
63 }; 63 };
64 64
65 } // namespace feedback 65 } // namespace feedback
66 66
67 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_ 67 #endif // CHROME_BROWSER_FEEDBACK_FEEDBACK_REPORT_H_
OLDNEW
« no previous file with comments | « chrome/browser/feedback/feedback_profile_observer.cc ('k') | chrome/browser/feedback/feedback_report.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698