| 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 // interfaces Start, DelayedDownloadOpened, MaybeCompleteDownload, and | 7 // interfaces Start, DelayedDownloadOpened, MaybeCompleteDownload, and |
| 8 // OnDownloadCompleting are placed in chronological order with the other | 8 // OnDownloadCompleting are placed in chronological order with the other |
| 9 // (private) routines that together define a DownloadItem's state transitions | 9 // (private) routines that together define a DownloadItem's state transitions |
| 10 // as the download progresses. See "Download progression cascade" later in | 10 // as the download progresses. See "Download progression cascade" later in |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 TARGET_DISPOSITION_PROMPT : TARGET_DISPOSITION_OVERWRITE), | 198 TARGET_DISPOSITION_PROMPT : TARGET_DISPOSITION_OVERWRITE), |
| 199 url_chain_(info.url_chain), | 199 url_chain_(info.url_chain), |
| 200 referrer_url_(info.referrer_url), | 200 referrer_url_(info.referrer_url), |
| 201 suggested_filename_(UTF16ToUTF8(info.save_info->suggested_name)), | 201 suggested_filename_(UTF16ToUTF8(info.save_info->suggested_name)), |
| 202 forced_file_path_(info.save_info->file_path), | 202 forced_file_path_(info.save_info->file_path), |
| 203 transition_type_(info.transition_type), | 203 transition_type_(info.transition_type), |
| 204 has_user_gesture_(info.has_user_gesture), | 204 has_user_gesture_(info.has_user_gesture), |
| 205 content_disposition_(info.content_disposition), | 205 content_disposition_(info.content_disposition), |
| 206 mime_type_(info.mime_type), | 206 mime_type_(info.mime_type), |
| 207 original_mime_type_(info.original_mime_type), | 207 original_mime_type_(info.original_mime_type), |
| 208 referrer_charset_(info.referrer_charset), | |
| 209 remote_address_(info.remote_address), | 208 remote_address_(info.remote_address), |
| 210 total_bytes_(info.total_bytes), | 209 total_bytes_(info.total_bytes), |
| 211 received_bytes_(0), | 210 received_bytes_(0), |
| 212 bytes_per_sec_(0), | 211 bytes_per_sec_(0), |
| 213 last_reason_(content::DOWNLOAD_INTERRUPT_REASON_NONE), | 212 last_reason_(content::DOWNLOAD_INTERRUPT_REASON_NONE), |
| 214 start_tick_(base::TimeTicks::Now()), | 213 start_tick_(base::TimeTicks::Now()), |
| 215 state_(IN_PROGRESS_INTERNAL), | 214 state_(IN_PROGRESS_INTERNAL), |
| 216 danger_type_(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS), | 215 danger_type_(content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS), |
| 217 start_time_(info.start_time), | 216 start_time_(info.start_time), |
| 218 db_handle_(DownloadItem::kUninitializedHandle), | 217 db_handle_(DownloadItem::kUninitializedHandle), |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 546 } |
| 548 | 547 |
| 549 std::string DownloadItemImpl::GetMimeType() const { | 548 std::string DownloadItemImpl::GetMimeType() const { |
| 550 return mime_type_; | 549 return mime_type_; |
| 551 } | 550 } |
| 552 | 551 |
| 553 std::string DownloadItemImpl::GetOriginalMimeType() const { | 552 std::string DownloadItemImpl::GetOriginalMimeType() const { |
| 554 return original_mime_type_; | 553 return original_mime_type_; |
| 555 } | 554 } |
| 556 | 555 |
| 557 std::string DownloadItemImpl::GetReferrerCharset() const { | |
| 558 return referrer_charset_; | |
| 559 } | |
| 560 | |
| 561 std::string DownloadItemImpl::GetRemoteAddress() const { | 556 std::string DownloadItemImpl::GetRemoteAddress() const { |
| 562 return remote_address_; | 557 return remote_address_; |
| 563 } | 558 } |
| 564 | 559 |
| 565 bool DownloadItemImpl::HasUserGesture() const { | 560 bool DownloadItemImpl::HasUserGesture() const { |
| 566 return has_user_gesture_; | 561 return has_user_gesture_; |
| 567 }; | 562 }; |
| 568 | 563 |
| 569 content::PageTransition DownloadItemImpl::GetTransitionType() const { | 564 content::PageTransition DownloadItemImpl::GetTransitionType() const { |
| 570 return transition_type_; | 565 return transition_type_; |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 return "COMPLETE"; | 1475 return "COMPLETE"; |
| 1481 case CANCELLED_INTERNAL: | 1476 case CANCELLED_INTERNAL: |
| 1482 return "CANCELLED"; | 1477 return "CANCELLED"; |
| 1483 case INTERRUPTED_INTERNAL: | 1478 case INTERRUPTED_INTERNAL: |
| 1484 return "INTERRUPTED"; | 1479 return "INTERRUPTED"; |
| 1485 default: | 1480 default: |
| 1486 NOTREACHED() << "Unknown download state " << state; | 1481 NOTREACHED() << "Unknown download state " << state; |
| 1487 return "unknown"; | 1482 return "unknown"; |
| 1488 }; | 1483 }; |
| 1489 } | 1484 } |
| OLD | NEW |