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

Unified Diff: components/upload_list/upload_list.h

Issue 2070993002: List all crashes in chrome://crashes, including those not uploaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
Index: components/upload_list/upload_list.h
diff --git a/components/upload_list/upload_list.h b/components/upload_list/upload_list.h
index 2bc3fe7affc19807111b872740c26b4182929f1e..f324d561b3cb010bda0c2b04fd44e9379e1f1c3c 100644
--- a/components/upload_list/upload_list.h
+++ b/components/upload_list/upload_list.h
@@ -22,23 +22,32 @@ class SequencedWorkerPool;
}
// Loads and parses an upload list text file of the format
-// upload_time,upload_id[,local_id[,capture_time]]
-// upload_time,upload_id[,local_id[,capture_time]]
+// upload_time,upload_id[,local_id[,capture_time[,state]]]
+// upload_time,upload_id[,local_id[,capture_time[,state]]]
// etc.
-// where each line represents an upload. |upload_time| and |capture_time| are
-// in Unix time. Must be used from the UI thread. The loading and parsing is
-// done on a blocking pool task runner. A line may or may not contain
-// |local_id| and |capture_time|.
+// where each line represents an upload. |upload_time| and |capture_time| are in
+// Unix time. |state| is an int in the range of UploadInfo::State. Must be used
+// from the UI thread. The loading and parsing is done on a blocking pool task
+// runner. A line may or may not contain |local_id|, |capture_time|, and
+// |state|.
class UploadList : public base::RefCountedThreadSafe<UploadList> {
public:
struct UploadInfo {
+ enum class State {
+ NotUploaded = 0,
+ Pending = 1,
+ Uploaded = 2,
+ };
+
UploadInfo(const std::string& upload_id,
const base::Time& upload_time,
const std::string& local_id,
- const base::Time& capture_time);
+ const base::Time& capture_time,
+ State state);
UploadInfo(const std::string& upload_id, const base::Time& upload_time);
~UploadInfo();
+ // These fields are only valid when |state| == UploadInfo::State::Uploaded.
std::string upload_id;
base::Time upload_time;
@@ -48,6 +57,8 @@ class UploadList : public base::RefCountedThreadSafe<UploadList> {
// The time the data was captured. This is useful if the data is stored
// locally when captured and uploaded at a later time.
base::Time capture_time;
+
+ State state;
};
class Delegate {

Powered by Google App Engine
This is Rietveld 408576698