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

Unified Diff: content/browser/download/download_persistent_store_info.h

Issue 8008021: Add new UMA stats to get a handle on Downloads UI Usage (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 9 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
Index: content/browser/download/download_persistent_store_info.h
diff --git a/content/browser/download/download_persistent_store_info.h b/content/browser/download/download_persistent_store_info.h
index 948d0481d43e83895bf1b9c72991397037196276..84a2b990f12c306cea1c921463651c798cd1bf31 100644
--- a/content/browser/download/download_persistent_store_info.h
+++ b/content/browser/download/download_persistent_store_info.h
@@ -19,7 +19,14 @@
class DownloadItem;
// Contains the information that is stored in the download system's persistent
-// store (or refers to it). Managed by the DownloadItem.
+// store (or refers to it). Managed by the DownloadItem. When used to create a
+// history entry, all fields except for |db_handle| are set by DownloadItem and
+// read by DownloadDatabase. When used to update a history entry, DownloadItem
+// sets all fields, but DownloadDatabase only reads |end_time|,
+// |received_bytes|, |state|, and |opened|, and uses |db_handle| to select the
+// row in the database table to update. When used to load DownloadItems from
+// the history, all fields except |referrer_url| are set by the DownloadDatabase
+// and read by the DownloadItem.
struct CONTENT_EXPORT DownloadPersistentStoreInfo {
// TODO(ahendrickson) -- Reduce the number of constructors.
DownloadPersistentStoreInfo();
@@ -27,36 +34,45 @@ struct CONTENT_EXPORT DownloadPersistentStoreInfo {
const GURL& url,
const GURL& referrer,
const base::Time& start,
+ const base::Time& end,
int64 received,
int64 total,
int32 download_state,
- int64 handle);
+ int64 handle,
+ bool download_opened);
~DownloadPersistentStoreInfo(); // For linux-clang.
// The final path where the download is saved.
FilePath path;
// The URL from which we are downloading. This is the final URL after any
- // redirection by the server for |url_chain|.
+ // redirection by the server for |url_chain|. Is not changed by UpdateEntry().
GURL url;
// The URL that referred us.
GURL referrer_url;
- // The time when the download started.
+ // The time when the download started. Is not changed by UpdateEntry().
base::Time start_time;
+ // The time when the download completed.
+ base::Time end_time;
+
// The number of bytes received (so far).
int64 received_bytes;
- // The total number of bytes in the download.
+ // The total number of bytes in the download. Is not changed by UpdateEntry().
int64 total_bytes;
// The current state of the download.
int32 state;
- // The handle of the download in the database.
+ // The handle of the download in the database. Is not changed by
+ // UpdateEntry().
int64 db_handle;
+
+ // Whether this download has ever been opened from the browser.
+ bool opened;
};
#endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_PERSISTENT_STORE_INFO_H_
« no previous file with comments | « content/browser/download/download_manager_delegate.h ('k') | content/browser/download/download_persistent_store_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698