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

Side by Side Diff: components/history/core/browser/download_row.h

Issue 1924473003: [Downloads] Use the initiating StoragePartition for resumption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in comment Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "components/history/core/browser/download_types.h" 15 #include "components/history/core/browser/download_types.h"
16 #include "url/gurl.h" 16 #include "url/gurl.h"
17 17
18 namespace history { 18 namespace history {
19 19
20 // Contains the information that is stored in the download system's persistent 20 // Contains the information that is stored in the download system's persistent
21 // store (or refers to it). DownloadHistory uses this to communicate with the 21 // store (or refers to it). DownloadHistory uses this to communicate with the
22 // DownloadDatabase through the HistoryService. 22 // DownloadDatabase through the HistoryService.
23 struct DownloadRow { 23 struct DownloadRow {
24 DownloadRow(); 24 DownloadRow();
25 DownloadRow(const base::FilePath& current_path, 25 DownloadRow(const base::FilePath& current_path,
26 const base::FilePath& target_path, 26 const base::FilePath& target_path,
27 const std::vector<GURL>& url_chain, 27 const std::vector<GURL>& url_chain,
28 const GURL& referrer_url, 28 const GURL& referrer_url,
29 const GURL& site_url,
29 const GURL& tab_url, 30 const GURL& tab_url,
30 const GURL& tab_referrer_url, 31 const GURL& tab_referrer_url,
31 const std::string& http_method, 32 const std::string& http_method,
32 const std::string& mime_type, 33 const std::string& mime_type,
33 const std::string& original_mime_type, 34 const std::string& original_mime_type,
34 const base::Time& start, 35 const base::Time& start,
35 const base::Time& end, 36 const base::Time& end,
36 const std::string& etag, 37 const std::string& etag,
37 const std::string& last_modified, 38 const std::string& last_modified,
38 int64_t received, 39 int64_t received,
(...skipping 21 matching lines...) Expand all
60 61
61 // The URL redirect chain through which we are downloading. The front 62 // The URL redirect chain through which we are downloading. The front
62 // is the url that the initial request went to, and the back is the 63 // is the url that the initial request went to, and the back is the
63 // url from which we ended up getting data. This is not changed by 64 // url from which we ended up getting data. This is not changed by
64 // UpdateDownload(). 65 // UpdateDownload().
65 std::vector<GURL> url_chain; 66 std::vector<GURL> url_chain;
66 67
67 // The URL that referred us. Is not changed by UpdateDownload(). 68 // The URL that referred us. Is not changed by UpdateDownload().
68 GURL referrer_url; 69 GURL referrer_url;
69 70
71 // The site URL for the site instance that initiated the download.
72 GURL site_url;
73
70 // The URL of the tab that initiated the download, if any. Not changed by 74 // The URL of the tab that initiated the download, if any. Not changed by
71 // UpdateDownload(). 75 // UpdateDownload().
72 GURL tab_url; 76 GURL tab_url;
73 77
74 // The referrer of the tab that initialized the download, if any. Not changed 78 // The referrer of the tab that initialized the download, if any. Not changed
75 // by UpdateDownload(); 79 // by UpdateDownload();
76 GURL tab_referrer_url; 80 GURL tab_referrer_url;
77 81
78 // HTTP method used for the request. GET is assumed if the method was not 82 // HTTP method used for the request. GET is assumed if the method was not
79 // stored for a download in the history database. 83 // stored for a download in the history database.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 bool opened; 133 bool opened;
130 134
131 // The id and name of the extension that created this download. 135 // The id and name of the extension that created this download.
132 std::string by_ext_id; 136 std::string by_ext_id;
133 std::string by_ext_name; 137 std::string by_ext_name;
134 }; 138 };
135 139
136 } // namespace history 140 } // namespace history
137 141
138 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 142 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_
OLDNEW
« no previous file with comments | « components/history/core/browser/download_database.cc ('k') | components/history/core/browser/download_row.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698