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 // File method ordering: Methods in this file are in the same order as | 5 // File method ordering: Methods in this file are in the same order as |
6 // in download_item_impl.h, with the following exception: The public | 6 // in download_item_impl.h, with the following exception: The public |
7 // interface Start is placed in chronological order with the other | 7 // interface Start is placed in chronological order with the other |
8 // (private) routines that together define a DownloadItem's state | 8 // (private) routines that together define a DownloadItem's state |
9 // transitions as the download progresses. See "Download progression | 9 // transitions as the download progresses. See "Download progression |
10 // cascade" later in this file. | 10 // cascade" later in this file. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 const int DownloadItemImpl::kMaxAutoResumeAttempts = 5; | 106 const int DownloadItemImpl::kMaxAutoResumeAttempts = 5; |
107 | 107 |
108 // Constructor for reading from the history service. | 108 // Constructor for reading from the history service. |
109 DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate, | 109 DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate, |
110 const std::string& guid, | 110 const std::string& guid, |
111 uint32_t download_id, | 111 uint32_t download_id, |
112 const base::FilePath& current_path, | 112 const base::FilePath& current_path, |
113 const base::FilePath& target_path, | 113 const base::FilePath& target_path, |
114 const std::vector<GURL>& url_chain, | 114 const std::vector<GURL>& url_chain, |
115 const GURL& referrer_url, | 115 const GURL& referrer_url, |
| 116 const GURL& tab_url, |
| 117 const GURL& tab_refererr_url, |
116 const std::string& mime_type, | 118 const std::string& mime_type, |
117 const std::string& original_mime_type, | 119 const std::string& original_mime_type, |
118 const base::Time& start_time, | 120 const base::Time& start_time, |
119 const base::Time& end_time, | 121 const base::Time& end_time, |
120 const std::string& etag, | 122 const std::string& etag, |
121 const std::string& last_modified, | 123 const std::string& last_modified, |
122 int64_t received_bytes, | 124 int64_t received_bytes, |
123 int64_t total_bytes, | 125 int64_t total_bytes, |
124 const std::string& hash, | 126 const std::string& hash, |
125 DownloadItem::DownloadState state, | 127 DownloadItem::DownloadState state, |
126 DownloadDangerType danger_type, | 128 DownloadDangerType danger_type, |
127 DownloadInterruptReason interrupt_reason, | 129 DownloadInterruptReason interrupt_reason, |
128 bool opened, | 130 bool opened, |
129 const net::BoundNetLog& bound_net_log) | 131 const net::BoundNetLog& bound_net_log) |
130 : guid_(base::ToUpperASCII(guid)), | 132 : guid_(base::ToUpperASCII(guid)), |
131 download_id_(download_id), | 133 download_id_(download_id), |
132 target_path_(target_path), | 134 target_path_(target_path), |
133 url_chain_(url_chain), | 135 url_chain_(url_chain), |
134 referrer_url_(referrer_url), | 136 referrer_url_(referrer_url), |
| 137 tab_url_(tab_url), |
| 138 tab_referrer_url_(tab_refererr_url), |
135 mime_type_(mime_type), | 139 mime_type_(mime_type), |
136 original_mime_type_(original_mime_type), | 140 original_mime_type_(original_mime_type), |
137 total_bytes_(total_bytes), | 141 total_bytes_(total_bytes), |
138 last_reason_(interrupt_reason), | 142 last_reason_(interrupt_reason), |
139 start_tick_(base::TimeTicks()), | 143 start_tick_(base::TimeTicks()), |
140 state_(ExternalToInternalState(state)), | 144 state_(ExternalToInternalState(state)), |
141 danger_type_(danger_type), | 145 danger_type_(danger_type), |
142 start_time_(start_time), | 146 start_time_(start_time), |
143 end_time_(end_time), | 147 end_time_(end_time), |
144 delegate_(delegate), | 148 delegate_(delegate), |
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 case RESUME_MODE_USER_CONTINUE: | 2090 case RESUME_MODE_USER_CONTINUE: |
2087 return "USER_CONTINUE"; | 2091 return "USER_CONTINUE"; |
2088 case RESUME_MODE_USER_RESTART: | 2092 case RESUME_MODE_USER_RESTART: |
2089 return "USER_RESTART"; | 2093 return "USER_RESTART"; |
2090 } | 2094 } |
2091 NOTREACHED() << "Unknown resume mode " << mode; | 2095 NOTREACHED() << "Unknown resume mode " << mode; |
2092 return "unknown"; | 2096 return "unknown"; |
2093 } | 2097 } |
2094 | 2098 |
2095 } // namespace content | 2099 } // namespace content |
OLD | NEW |