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

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

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 years, 5 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Download struct used for informing and querying the history service. 5 // Download struct used for informing and querying the history service.
6 6
7 #ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_ 7 #ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
8 #define CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_ 8 #define CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
9 #pragma once 9 #pragma once
10 10
11 #include <vector>
12
13 #include "base/file_path.h" 11 #include "base/file_path.h"
14 #include "base/time.h" 12 #include "base/time.h"
15 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
16 14
17 class DownloadItem; 15 class DownloadItem;
18 16
19 // Contains the information that is stored in the download history database 17 // Contains the information that is stored in the download history database
20 // (or refers to it). Managed by the DownloadItem. 18 // (or refers to it). Managed by the DownloadItem.
21 struct DownloadHistoryInfo { 19 struct DownloadHistoryInfo {
22 // TODO(ahendrickson) -- Reduce the number of constructors.
23 DownloadHistoryInfo();
24 DownloadHistoryInfo(const FilePath& path, 20 DownloadHistoryInfo(const FilePath& path,
25 const GURL& url, 21 const GURL& url,
26 const GURL& referrer, 22 const GURL& referrer,
27 const base::Time& start, 23 const base::Time& start,
28 int64 received, 24 int64 received,
29 int64 total, 25 int64 total,
30 int32 download_state, 26 int32 download_state,
31 int64 handle); 27 int32 id);
32 ~DownloadHistoryInfo(); // For linux-clang. 28 ~DownloadHistoryInfo() {}
33 29
34 // The final path where the download is saved. 30 // The final path where the download is saved.
35 FilePath path; 31 FilePath path;
36 32
37 // The URL from which we are downloading. This is the final URL after any 33 // The URL from which we are downloading. This is the final URL after any
38 // redirection by the server for |url_chain|. 34 // redirection by the server for |url_chain|.
39 GURL url; 35 GURL url;
40 36
41 // The URL that referred us. 37 // The URL that referred us.
42 GURL referrer_url; 38 GURL referrer_url;
43 39
44 // The time when the download started. 40 // The time when the download started.
45 base::Time start_time; 41 base::Time start_time;
46 42
47 // The number of bytes received (so far). 43 // The number of bytes received (so far).
48 int64 received_bytes; 44 int64 received_bytes;
49 45
50 // The total number of bytes in the download. 46 // The total number of bytes in the download.
51 int64 total_bytes; 47 int64 total_bytes;
52 48
53 // The current state of the download. 49 // The current state of the download.
54 int32 state; 50 int32 state;
55 51
56 // The handle of the download in the database. 52 // This download item's unique persistent identifier.
57 int64 db_handle; 53 int32 id;
58 }; 54 };
59 55
60 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_ 56 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/download_database.cc ('k') | chrome/browser/history/download_history_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698