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

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

Issue 6969009: Reduced the lifetime of DownloadCreateInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed an early return to a DCHECK. Created 9 years, 7 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) 2011 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 // Download struct used for informing and querying the history service.
6
7 #ifndef CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
8 #define CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
9 #pragma once
10
11 #include <vector>
12
13 #include "base/file_path.h"
14 #include "base/time.h"
15 #include "googleurl/src/gurl.h"
16
17 class DownloadItem;
18
19 // Contains the information that is stored in the download history database
20 // (or refers to it). Managed by the DownloadItem.
21 struct DownloadHistoryInfo {
22 // TODO(ahendrickson) -- Reduce the number of constructors.
23 DownloadHistoryInfo();
24 DownloadHistoryInfo(const FilePath& path,
25 const GURL& url,
26 const GURL& referrer,
27 const base::Time& start,
28 int64 received,
29 int64 total,
30 int32 download_state,
31 int64 handle);
32
33 // The final path where the download is saved.
34 FilePath path;
35
36 // The URL from which we are downloading. This is the final URL after any
37 // redirection by the server for |url_chain|.
38 GURL url;
39
40 // The URL that referred us.
41 GURL referrer_url;
42
43 // The time when the download started.
44 base::Time start_time;
45
46 // The number of bytes received (so far).
47 int64 received_bytes;
48
49 // The total number of bytes in the download.
50 int64 total_bytes;
51
52 // The current state of the download.
53 int32 state;
54
55 // The handle of the download in the database.
56 int64 db_handle;
57 };
58
59 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698