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

Side by Side Diff: content/browser/download/download_create_info.h

Issue 2783473002: Fix issues and feature polishing for parallel download. (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « no previous file | content/browser/download/download_request_core.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // The referrer URL of the tab that started us. 57 // The referrer URL of the tab that started us.
58 GURL tab_referrer_url; 58 GURL tab_referrer_url;
59 59
60 // The time when the download started. 60 // The time when the download started.
61 base::Time start_time; 61 base::Time start_time;
62 62
63 // The size of the response body. If content-length response header is not 63 // The size of the response body. If content-length response header is not
64 // presented or can't be parse, set to 0. 64 // presented or can't be parse, set to 0.
65 int64_t total_bytes; 65 int64_t total_bytes;
66 66
67 // The starting position of the request to save to the target file. 67 // The starting position of the initial request.
68 // This value matches the offset in DownloadSaveInfo. 68 // This value matches the offset in DownloadSaveInfo.
69 // TODO(xingliu): Remove this after we refactor DownloadJob to own 69 // TODO(xingliu): Refactor to remove |offset| and |length|.
70 // DownloadFile.
71 int64_t offset; 70 int64_t offset;
72 71
72 // The length of the initial request.
73 // This value matches the length in DownloadSaveInfo.
74 int64_t length;
qinmin 2017/03/31 17:56:09 the initial request is always half open, right? wh
xingliu 2017/03/31 21:46:10 Done, addressed in https://codereview.chromium.org
75
73 // True if the download was initiated by user action. 76 // True if the download was initiated by user action.
74 bool has_user_gesture; 77 bool has_user_gesture;
75 78
76 base::Optional<ui::PageTransition> transition_type; 79 base::Optional<ui::PageTransition> transition_type;
77 80
78 // The remote IP address where the download was fetched from. Copied from 81 // The remote IP address where the download was fetched from. Copied from
79 // UrlRequest::GetSocketAddress(). 82 // UrlRequest::GetSocketAddress().
80 std::string remote_address; 83 std::string remote_address;
81 84
82 // If the download is initially created in an interrupted state (because the 85 // If the download is initially created in an interrupted state (because the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // The HTTP connection type. 127 // The HTTP connection type.
125 net::HttpResponseInfo::ConnectionInfo connection_info; 128 net::HttpResponseInfo::ConnectionInfo connection_info;
126 129
127 private: 130 private:
128 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); 131 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo);
129 }; 132 };
130 133
131 } // namespace content 134 } // namespace content
132 135
133 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 136 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_request_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698