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

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

Issue 1875033005: [Downloads/History] Add tab-url and tab-referrer-url to DownloadRow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guid-fix
Patch Set: Update expectations for DownloadUIController test. Created 4 years, 8 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, 28 const GURL& referrer_url,
29 const GURL& tab_url,
30 const GURL& tab_referrer_url,
29 const std::string& http_method, 31 const std::string& http_method,
30 const std::string& mime_type, 32 const std::string& mime_type,
31 const std::string& original_mime_type, 33 const std::string& original_mime_type,
32 const base::Time& start, 34 const base::Time& start,
33 const base::Time& end, 35 const base::Time& end,
34 const std::string& etag, 36 const std::string& etag,
35 const std::string& last_modified, 37 const std::string& last_modified,
36 int64_t received, 38 int64_t received,
37 int64_t total, 39 int64_t total,
38 DownloadState download_state, 40 DownloadState download_state,
(...skipping 19 matching lines...) Expand all
58 60
59 // The URL redirect chain through which we are downloading. The front 61 // The URL redirect chain through which we are downloading. The front
60 // is the url that the initial request went to, and the back is the 62 // is the url that the initial request went to, and the back is the
61 // url from which we ended up getting data. This is not changed by 63 // url from which we ended up getting data. This is not changed by
62 // UpdateDownload(). 64 // UpdateDownload().
63 std::vector<GURL> url_chain; 65 std::vector<GURL> url_chain;
64 66
65 // The URL that referred us. Is not changed by UpdateDownload(). 67 // The URL that referred us. Is not changed by UpdateDownload().
66 GURL referrer_url; 68 GURL referrer_url;
67 69
70 // The URL of the tab that initiated the download, if any. Not changed by
71 // UpdateDownload().
72 GURL tab_url;
73
74 // The referrer of the tab that initialized the download, if any. Not changed
75 // by UpdateDownload();
76 GURL tab_referrer_url;
77
68 // HTTP method used for the request. GET is assumed if the method was not 78 // HTTP method used for the request. GET is assumed if the method was not
69 // stored for a download in the history database. 79 // stored for a download in the history database.
70 std::string http_method; 80 std::string http_method;
71 81
72 // The MIME type of the download, might be based on heuristics. 82 // The MIME type of the download, might be based on heuristics.
73 std::string mime_type; 83 std::string mime_type;
74 84
75 // The original MIME type of the download. 85 // The original MIME type of the download.
76 std::string original_mime_type; 86 std::string original_mime_type;
77 87
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool opened; 129 bool opened;
120 130
121 // The id and name of the extension that created this download. 131 // The id and name of the extension that created this download.
122 std::string by_ext_id; 132 std::string by_ext_id;
123 std::string by_ext_name; 133 std::string by_ext_name;
124 }; 134 };
125 135
126 } // namespace history 136 } // namespace history
127 137
128 #endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_ROW_H_ 138 #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