Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 total download size. |
| 63 int64_t total_bytes; | 63 int64_t total_bytes; |
|
asanka
2017/03/17 17:10:09
This is now the size of the response body, not the
xingliu
2017/03/17 19:08:25
Done, change the comment here, to address this is
| |
| 64 | 64 |
| 65 // The starting position of the request to save to the target file. | |
|
asanka
2017/03/17 17:10:09
Can you add a comment indicating that this must ma
xingliu
2017/03/17 19:08:25
Done, also put a TODO, I think if we refactor job
| |
| 66 int64_t offset; | |
| 67 | |
| 65 // True if the download was initiated by user action. | 68 // True if the download was initiated by user action. |
| 66 bool has_user_gesture; | 69 bool has_user_gesture; |
| 67 | 70 |
| 68 base::Optional<ui::PageTransition> transition_type; | 71 base::Optional<ui::PageTransition> transition_type; |
| 69 | 72 |
| 70 // The remote IP address where the download was fetched from. Copied from | 73 // The remote IP address where the download was fetched from. Copied from |
| 71 // UrlRequest::GetSocketAddress(). | 74 // UrlRequest::GetSocketAddress(). |
| 72 std::string remote_address; | 75 std::string remote_address; |
| 73 | 76 |
| 74 // If the download is initially created in an interrupted state (because the | 77 // If the download is initially created in an interrupted state (because the |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 // If "Accept-Ranges:bytes" header presents in the response header. | 116 // If "Accept-Ranges:bytes" header presents in the response header. |
| 114 bool accept_range; | 117 bool accept_range; |
| 115 | 118 |
| 116 private: | 119 private: |
| 117 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); | 120 DISALLOW_COPY_AND_ASSIGN(DownloadCreateInfo); |
| 118 }; | 121 }; |
| 119 | 122 |
| 120 } // namespace content | 123 } // namespace content |
| 121 | 124 |
| 122 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ | 125 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ |
| OLD | NEW |