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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 mime_type_(info.mime_type), | 213 mime_type_(info.mime_type), |
214 original_mime_type_(info.original_mime_type), | 214 original_mime_type_(info.original_mime_type), |
215 remote_address_(info.remote_address), | 215 remote_address_(info.remote_address), |
216 total_bytes_(info.total_bytes), | 216 total_bytes_(info.total_bytes), |
217 last_reason_(info.result), | 217 last_reason_(info.result), |
218 start_tick_(base::TimeTicks::Now()), | 218 start_tick_(base::TimeTicks::Now()), |
219 state_(INITIAL_INTERNAL), | 219 state_(INITIAL_INTERNAL), |
220 start_time_(info.start_time), | 220 start_time_(info.start_time), |
221 delegate_(delegate), | 221 delegate_(delegate), |
222 is_temporary_(!info.save_info->file_path.empty()), | 222 is_temporary_(!info.save_info->file_path.empty()), |
| 223 transient_(info.transient), |
223 last_modified_time_(info.last_modified), | 224 last_modified_time_(info.last_modified), |
224 etag_(info.etag), | 225 etag_(info.etag), |
225 net_log_(net_log), | 226 net_log_(net_log), |
226 weak_ptr_factory_(this) { | 227 weak_ptr_factory_(this) { |
227 delegate_->Attach(); | 228 delegate_->Attach(); |
228 Init(true /* actively downloading */, SRC_ACTIVE_DOWNLOAD); | 229 Init(true /* actively downloading */, SRC_ACTIVE_DOWNLOAD); |
229 | 230 |
230 // Link the event sources. | 231 // Link the event sources. |
231 net_log_.AddEvent( | 232 net_log_.AddEvent( |
232 net::NetLogEventType::DOWNLOAD_URL_REQUEST, | 233 net::NetLogEventType::DOWNLOAD_URL_REQUEST, |
(...skipping 1962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 case RESUME_MODE_USER_CONTINUE: | 2196 case RESUME_MODE_USER_CONTINUE: |
2196 return "USER_CONTINUE"; | 2197 return "USER_CONTINUE"; |
2197 case RESUME_MODE_USER_RESTART: | 2198 case RESUME_MODE_USER_RESTART: |
2198 return "USER_RESTART"; | 2199 return "USER_RESTART"; |
2199 } | 2200 } |
2200 NOTREACHED() << "Unknown resume mode " << mode; | 2201 NOTREACHED() << "Unknown resume mode " << mode; |
2201 return "unknown"; | 2202 return "unknown"; |
2202 } | 2203 } |
2203 | 2204 |
2204 } // namespace content | 2205 } // namespace content |
OLD | NEW |