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

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

Issue 10915180: Make DownloadHistory observe manager, items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | 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_PERSISTENT_STORE_INFO_H_
6 #define CHROME_BROWSER_HISTORY_DOWNLOAD_PERSISTENT_STORE_INFO_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 // Contains the information that is stored in the download system's persistent
14 // store (or refers to it). DownloadHistory uses this to communicate with the
15 // DownloadDatabase through the HistoryService.
16 struct DownloadPersistentStoreInfo {
17 DownloadPersistentStoreInfo();
18 DownloadPersistentStoreInfo(
19 const FilePath& path,
20 const GURL& url,
21 const GURL& referrer,
22 const base::Time& start,
23 const base::Time& end,
24 int64 received,
25 int64 total,
26 content::DownloadItem::DownloadState download_state,
27 int64 handle,
28 bool download_opened);
29 ~DownloadPersistentStoreInfo();
30
31 // The final path where the download is saved.
32 FilePath path;
33
34 // The URL from which we are downloading. This is the final URL after any
35 // redirection by the server for |url_chain|. Is not changed by UpdateEntry().
36 GURL url;
37
38 // The URL that referred us.
39 GURL referrer_url;
40
41 // The time when the download started. Is not changed by UpdateEntry().
42 base::Time start_time;
43
44 // The time when the download completed.
45 base::Time end_time;
46
47 // The number of bytes received (so far).
48 int64 received_bytes;
49
50 // The total number of bytes in the download. Is not changed by UpdateEntry().
51 int64 total_bytes;
52
53 // The current state of the download.
54 content::DownloadItem::DownloadState state;
55
56 // The handle of the download in the database. Is not changed by
57 // UpdateEntry().
58 int64 db_handle;
59
60 // Whether this download has ever been opened from the browser.
61 bool opened;
62 };
63
64 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_PERSISTENT_STORE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698