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

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

Issue 2742093002: Glue parallel download job and download file together. (Closed)
Patch Set: Rebase, and adjust unittests with recent landed CLs. Created 3 years, 9 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_create_info.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 // The URL of the tab that started us. 53 // The URL of the tab that started us.
54 GURL tab_url; 54 GURL tab_url;
55 55
56 // The referrer URL of the tab that started us. 56 // The referrer URL of the tab that started us.
57 GURL tab_referrer_url; 57 GURL tab_referrer_url;
58 58
59 // The time when the download started. 59 // The time when the download started.
60 base::Time start_time; 60 base::Time start_time;
61 61
62 // The total download size. 62 // The size of the response body. If content-length response header is not
63 // presented or can't be parse, set to 0.
63 int64_t total_bytes; 64 int64_t total_bytes;
64 65
66 // The starting position of the request to save to the target file.
67 // This value matches the offset in DownloadSaveInfo.
68 // TODO(xingliu): Remove this after we refactor DownloadJob to own
69 // DownloadFile.
70 int64_t offset;
71
65 // True if the download was initiated by user action. 72 // True if the download was initiated by user action.
66 bool has_user_gesture; 73 bool has_user_gesture;
67 74
68 base::Optional<ui::PageTransition> transition_type; 75 base::Optional<ui::PageTransition> transition_type;
69 76
70 // The remote IP address where the download was fetched from. Copied from 77 // The remote IP address where the download was fetched from. Copied from
71 // UrlRequest::GetSocketAddress(). 78 // UrlRequest::GetSocketAddress().
72 std::string remote_address; 79 std::string remote_address;
73 80
74 // If the download is initially created in an interrupted state (because the 81 // If the download is initially created in an interrupted state (because the
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // If "Accept-Ranges:bytes" header presents in the response header. 120 // If "Accept-Ranges:bytes" header presents in the response header.
114 bool accept_range; 121 bool accept_range;
115 122
116 private: 123 private:
117 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); 124 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo);
118 }; 125 };
119 126
120 } // namespace content 127 } // namespace content
121 128
122 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 129 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/download_create_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698