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

Side by Side Diff: components/upload_list/upload_list.h

Issue 2330573002: Show crash report size in crashes UI for Android. (Closed)
Patch Set: Add a copy constructor Created 4 years, 3 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
« no previous file with comments | « components/crash_strings.grdp ('k') | components/upload_list/upload_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_UPLOAD_LIST_UPLOAD_LIST_H_ 5 #ifndef COMPONENTS_UPLOAD_LIST_UPLOAD_LIST_H_
6 #define COMPONENTS_UPLOAD_LIST_UPLOAD_LIST_H_ 6 #define COMPONENTS_UPLOAD_LIST_UPLOAD_LIST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 27 matching lines...) Expand all
38 Pending, 38 Pending,
39 Pending_UserRequested, 39 Pending_UserRequested,
40 Uploaded, 40 Uploaded,
41 }; 41 };
42 42
43 UploadInfo(const std::string& upload_id, 43 UploadInfo(const std::string& upload_id,
44 const base::Time& upload_time, 44 const base::Time& upload_time,
45 const std::string& local_id, 45 const std::string& local_id,
46 const base::Time& capture_time, 46 const base::Time& capture_time,
47 State state); 47 State state);
48 // Constructor for locally stored data.
49 UploadInfo(const std::string& local_id,
50 const base::Time& capture_time,
51 State state,
52 const base::string16& file_size);
48 UploadInfo(const std::string& upload_id, const base::Time& upload_time); 53 UploadInfo(const std::string& upload_id, const base::Time& upload_time);
54 UploadInfo(const UploadInfo& upload_info);
49 ~UploadInfo(); 55 ~UploadInfo();
50 56
51 // These fields are only valid when |state| == UploadInfo::State::Uploaded. 57 // These fields are only valid when |state| == UploadInfo::State::Uploaded.
52 std::string upload_id; 58 std::string upload_id;
53 base::Time upload_time; 59 base::Time upload_time;
54 60
55 // ID for locally stored data that may or may not be uploaded. 61 // ID for locally stored data that may or may not be uploaded.
56 std::string local_id; 62 std::string local_id;
57 63
58 // The time the data was captured. This is useful if the data is stored 64 // The time the data was captured. This is useful if the data is stored
59 // locally when captured and uploaded at a later time. 65 // locally when captured and uploaded at a later time.
60 base::Time capture_time; 66 base::Time capture_time;
61 67
62 State state; 68 State state;
69
70 // Formatted file size for locally stored data.
71 base::string16 file_size;
63 }; 72 };
64 73
65 class Delegate { 74 class Delegate {
66 public: 75 public:
67 // Invoked when the upload list has been loaded. Will be called on the 76 // Invoked when the upload list has been loaded. Will be called on the
68 // UI thread. 77 // UI thread.
69 virtual void OnUploadListAvailable() = 0; 78 virtual void OnUploadListAvailable() = 0;
70 79
71 protected: 80 protected:
72 virtual ~Delegate() {} 81 virtual ~Delegate() {}
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 Delegate* delegate_; 135 Delegate* delegate_;
127 136
128 const base::FilePath upload_log_path_; 137 const base::FilePath upload_log_path_;
129 138
130 scoped_refptr<base::SequencedWorkerPool> worker_pool_; 139 scoped_refptr<base::SequencedWorkerPool> worker_pool_;
131 140
132 DISALLOW_COPY_AND_ASSIGN(UploadList); 141 DISALLOW_COPY_AND_ASSIGN(UploadList);
133 }; 142 };
134 143
135 #endif // COMPONENTS_UPLOAD_LIST_UPLOAD_LIST_H_ 144 #endif // COMPONENTS_UPLOAD_LIST_UPLOAD_LIST_H_
OLDNEW
« no previous file with comments | « components/crash_strings.grdp ('k') | components/upload_list/upload_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698