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

Unified Diff: components/upload_list/upload_list.h

Issue 1405373002: Fix WebRTC log list errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 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 | « components/crash/core/browser/crashes_ui_util.cc ('k') | components/upload_list/upload_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/upload_list/upload_list.h
diff --git a/components/upload_list/upload_list.h b/components/upload_list/upload_list.h
index 2becc6ad4673d11c16606e2354fb8b24472c490f..f384f3e79d019a409c91cb1a23412f366c7330fd 100644
--- a/components/upload_list/upload_list.h
+++ b/components/upload_list/upload_list.h
@@ -20,25 +20,32 @@ class SequencedWorkerPool;
}
// Loads and parses an upload list text file of the format
-// time,id[,local_id]
-// time,id[,local_id]
+// upload_time,upload_id[,local_id[,capture_time]]
+// upload_time,upload_id[,local_id[,capture_time]]
// etc.
-// where each line represents an upload and "time" is 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".
+// 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|.
class UploadList : public base::RefCountedThreadSafe<UploadList> {
public:
struct UploadInfo {
- UploadInfo(const std::string& id,
- const base::Time& t,
- const std::string& local_id);
- UploadInfo(const std::string& id, const base::Time& t);
+ UploadInfo(const std::string& upload_id,
+ const base::Time& upload_time,
+ const std::string& local_id,
+ const base::Time& capture_time);
+ UploadInfo(const std::string& upload_id, const base::Time& upload_time);
~UploadInfo();
- std::string id;
- base::Time time;
- // ID for a locally stored object that may or may not be uploaded.
+ std::string upload_id;
+ base::Time upload_time;
+
+ // ID for locally stored data that may or may not be uploaded.
std::string local_id;
+
+ // 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;
};
class Delegate {
@@ -83,8 +90,13 @@ class UploadList : public base::RefCountedThreadSafe<UploadList> {
private:
friend class base::RefCountedThreadSafe<UploadList>;
- FRIEND_TEST_ALL_PREFIXES(UploadListTest, ParseLogEntries);
- FRIEND_TEST_ALL_PREFIXES(UploadListTest, ParseLogEntriesWithLocalId);
+ FRIEND_TEST_ALL_PREFIXES(UploadListTest, ParseUploadTimeUploadId);
+ FRIEND_TEST_ALL_PREFIXES(UploadListTest, ParseUploadTimeUploadIdLocalId);
+ FRIEND_TEST_ALL_PREFIXES(UploadListTest, ParseUploadTimeUploadIdCaptureTime);
+ FRIEND_TEST_ALL_PREFIXES(UploadListTest, ParseLocalIdCaptureTime);
+ FRIEND_TEST_ALL_PREFIXES(UploadListTest,
+ ParseUploadTimeUploadIdLocalIdCaptureTime);
+ FRIEND_TEST_ALL_PREFIXES(UploadListTest, ParseMultipleEntries);
// Manages the background thread work for LoadUploadListAsynchronously().
void LoadUploadListAndInformDelegateOfCompletion(
« no previous file with comments | « components/crash/core/browser/crashes_ui_util.cc ('k') | components/upload_list/upload_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698