| 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_ITEM_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 bool CanResume() const override; | 123 bool CanResume() const override; |
| 124 bool IsDone() const override; | 124 bool IsDone() const override; |
| 125 const GURL& GetURL() const override; | 125 const GURL& GetURL() const override; |
| 126 const std::vector<GURL>& GetUrlChain() const override; | 126 const std::vector<GURL>& GetUrlChain() const override; |
| 127 const GURL& GetOriginalUrl() const override; | 127 const GURL& GetOriginalUrl() const override; |
| 128 const GURL& GetReferrerUrl() const override; | 128 const GURL& GetReferrerUrl() const override; |
| 129 const GURL& GetSiteUrl() const override; | 129 const GURL& GetSiteUrl() const override; |
| 130 const GURL& GetTabUrl() const override; | 130 const GURL& GetTabUrl() const override; |
| 131 const GURL& GetTabReferrerUrl() const override; | 131 const GURL& GetTabReferrerUrl() const override; |
| 132 std::string GetSuggestedFilename() const override; | 132 std::string GetSuggestedFilename() const override; |
| 133 int GetResponseCode() const override; |
| 133 std::string GetContentDisposition() const override; | 134 std::string GetContentDisposition() const override; |
| 134 std::string GetMimeType() const override; | 135 std::string GetMimeType() const override; |
| 135 std::string GetOriginalMimeType() const override; | 136 std::string GetOriginalMimeType() const override; |
| 136 std::string GetRemoteAddress() const override; | 137 std::string GetRemoteAddress() const override; |
| 137 bool HasUserGesture() const override; | 138 bool HasUserGesture() const override; |
| 138 ui::PageTransition GetTransitionType() const override; | 139 ui::PageTransition GetTransitionType() const override; |
| 139 const std::string& GetLastModifiedTime() const override; | 140 const std::string& GetLastModifiedTime() const override; |
| 140 const std::string& GetETag() const override; | 141 const std::string& GetETag() const override; |
| 141 bool IsSavePackageDownload() const override; | 142 bool IsSavePackageDownload() const override; |
| 142 const base::FilePath& GetFullPath() const override; | 143 const base::FilePath& GetFullPath() const override; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 // If non-empty, contains an externally supplied path that should be used as | 562 // If non-empty, contains an externally supplied path that should be used as |
| 562 // the target path. | 563 // the target path. |
| 563 base::FilePath forced_file_path_; | 564 base::FilePath forced_file_path_; |
| 564 | 565 |
| 565 // Page transition that triggerred the download. | 566 // Page transition that triggerred the download. |
| 566 ui::PageTransition transition_type_ = ui::PAGE_TRANSITION_LINK; | 567 ui::PageTransition transition_type_ = ui::PAGE_TRANSITION_LINK; |
| 567 | 568 |
| 568 // Whether the download was triggered with a user gesture. | 569 // Whether the download was triggered with a user gesture. |
| 569 bool has_user_gesture_ = false; | 570 bool has_user_gesture_ = false; |
| 570 | 571 |
| 571 // Information from the request. | 572 // Information from the response. |
| 573 |
| 574 // The HTTP response code. This is 0 when the response has not yet been |
| 575 // received or if the response code text could not be parsed. |
| 576 int response_code_ = 0; |
| 577 |
| 572 // Content-disposition field from the header. | 578 // Content-disposition field from the header. |
| 573 std::string content_disposition_; | 579 std::string content_disposition_; |
| 574 | 580 |
| 575 // Mime-type from the header. Subject to change. | 581 // Mime-type from the header. Subject to change. |
| 576 std::string mime_type_; | 582 std::string mime_type_; |
| 577 | 583 |
| 578 // The value of the content type header sent with the downloaded item. It | 584 // The value of the content type header sent with the downloaded item. It |
| 579 // may be different from |mime_type_|, which may be set based on heuristics | 585 // may be different from |mime_type_|, which may be set based on heuristics |
| 580 // which may look at the file extension and first few bytes of the file. | 586 // which may look at the file extension and first few bytes of the file. |
| 581 std::string original_mime_type_; | 587 std::string original_mime_type_; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 std::unique_ptr<DownloadJob> job_; | 710 std::unique_ptr<DownloadJob> job_; |
| 705 | 711 |
| 706 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 712 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 707 | 713 |
| 708 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 714 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 709 }; | 715 }; |
| 710 | 716 |
| 711 } // namespace content | 717 } // namespace content |
| 712 | 718 |
| 713 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 719 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |