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

Side by Side Diff: chrome/browser/history/download_row.h

Issue 10915180: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r168573 Created 8 years, 1 month 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_ROW_H_
6 #define CHROME_BROWSER_HISTORY_DOWNLOAD_ROW_H_
7
8 #include "base/file_path.h"
9 #include "base/time.h"
10 #include "content/public/browser/download_item.h"
11 #include "googleurl/src/gurl.h"
12
13 namespace history {
14
15 // Contains the information that is stored in the download system's persistent
16 // store (or refers to it). DownloadHistory uses this to communicate with the
17 // DownloadDatabase through the HistoryService.
18 struct DownloadRow {
19 DownloadRow();
20 DownloadRow(
21 const FilePath& path,
22 const GURL& url,
23 const GURL& referrer,
24 const base::Time& start,
25 const base::Time& end,
26 int64 received,
27 int64 total,
28 content::DownloadItem::DownloadState download_state,
29 int64 handle,
30 bool download_opened);
31 ~DownloadRow();
32
33 // The current path to the downloaded file.
34 // TODO(benjhayden/asanka): Persist the target filename as well.
35 FilePath path;
36
37 // The URL from which we are downloading. This is the final URL after any
38 // redirection by the server for |url_chain|. Is not changed by
39 // UpdateDownload().
40 GURL url;
41
42 // The URL that referred us. Is not changed by UpdateDownload().
43 GURL referrer_url;
44
45 // The time when the download started. Is not changed by UpdateDownload().
46 base::Time start_time;
47
48 // The time when the download completed.
49 base::Time end_time;
50
51 // The number of bytes received (so far).
52 int64 received_bytes;
53
54 // The total number of bytes in the download. Is not changed by
55 // UpdateDownload().
56 int64 total_bytes;
57
58 // The current state of the download.
59 content::DownloadItem::DownloadState state;
60
61 // The handle of the download in the database. Is not changed by
62 // UpdateDownload().
63 int64 db_handle;
64
65 // Whether this download has ever been opened from the browser.
66 bool opened;
67 };
68
69 } // namespace history
70
71 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_ROW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698