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

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: Removed spurious 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 DownloadHistoryInfo();
23 DownloadHistoryInfo(const std::vector<GURL>& url,
24 const GURL& referrer,
25 int64 total_bytes);
26 DownloadHistoryInfo(const FilePath& path,
27 const GURL& url,
28 const base::Time& start,
29 int64 received,
30 int64 total,
31 int32 download_state);
32 DownloadHistoryInfo(const FilePath& path,
33 const std::vector<GURL>& url,
34 const GURL& referrer,
35 const base::Time& start,
36 int64 received,
37 int64 total,
38 int32 download_state,
39 int64 handle,
40 int32 id);
41
42 // The URL from which we are downloading. This is the final URL after any
43 // redirection by the server for |url_chain|.
44 const GURL& url() const;
45
46 // Download ID assigned by DownloadResourceHandler.
47 // Used by the history back end, to return in a callback.
48 int32 download_id;
49
50 // The final path where the download is saved.
51 FilePath path;
52
53 // The chain of redirects that leading up to and including the final URL.
54 std::vector<GURL> url_chain;
55
56 // The URL that referred us.
57 GURL referrer_url;
58
59 // The time when the download started.
60 base::Time start_time;
61
62 // The number of bytes received (so far).
63 int64 received_bytes;
64
65 // The total number of bytes in the download.
66 int64 total_bytes;
67
68 // The current state of the download.
69 int32 state;
70
71 // The handle of the download in the database.
72 int64 db_handle;
73 };
74
75 #endif // CHROME_BROWSER_HISTORY_DOWNLOAD_HISTORY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698