| 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 const scoped_refptr<const net::HttpResponseHeaders>& GetResponseHeaders() |
| 134 const override; |
| 133 std::string GetContentDisposition() const override; | 135 std::string GetContentDisposition() const override; |
| 134 std::string GetMimeType() const override; | 136 std::string GetMimeType() const override; |
| 135 std::string GetOriginalMimeType() const override; | 137 std::string GetOriginalMimeType() const override; |
| 136 std::string GetRemoteAddress() const override; | 138 std::string GetRemoteAddress() const override; |
| 137 bool HasUserGesture() const override; | 139 bool HasUserGesture() const override; |
| 138 ui::PageTransition GetTransitionType() const override; | 140 ui::PageTransition GetTransitionType() const override; |
| 139 const std::string& GetLastModifiedTime() const override; | 141 const std::string& GetLastModifiedTime() const override; |
| 140 const std::string& GetETag() const override; | 142 const std::string& GetETag() const override; |
| 141 bool IsSavePackageDownload() const override; | 143 bool IsSavePackageDownload() const override; |
| 142 const base::FilePath& GetFullPath() const override; | 144 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 | 563 // If non-empty, contains an externally supplied path that should be used as |
| 562 // the target path. | 564 // the target path. |
| 563 base::FilePath forced_file_path_; | 565 base::FilePath forced_file_path_; |
| 564 | 566 |
| 565 // Page transition that triggerred the download. | 567 // Page transition that triggerred the download. |
| 566 ui::PageTransition transition_type_ = ui::PAGE_TRANSITION_LINK; | 568 ui::PageTransition transition_type_ = ui::PAGE_TRANSITION_LINK; |
| 567 | 569 |
| 568 // Whether the download was triggered with a user gesture. | 570 // Whether the download was triggered with a user gesture. |
| 569 bool has_user_gesture_ = false; | 571 bool has_user_gesture_ = false; |
| 570 | 572 |
| 571 // Information from the request. | 573 // Information from the response. |
| 574 |
| 575 // The HTTP response headers. This contains a nullptr when the response has |
| 576 // not yet been received. Only for consuming headers. |
| 577 scoped_refptr<const net::HttpResponseHeaders> response_headers_; |
| 578 |
| 572 // Content-disposition field from the header. | 579 // Content-disposition field from the header. |
| 573 std::string content_disposition_; | 580 std::string content_disposition_; |
| 574 | 581 |
| 575 // Mime-type from the header. Subject to change. | 582 // Mime-type from the header. Subject to change. |
| 576 std::string mime_type_; | 583 std::string mime_type_; |
| 577 | 584 |
| 578 // The value of the content type header sent with the downloaded item. It | 585 // 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 | 586 // 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. | 587 // which may look at the file extension and first few bytes of the file. |
| 581 std::string original_mime_type_; | 588 std::string original_mime_type_; |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 std::unique_ptr<DownloadJob> job_; | 711 std::unique_ptr<DownloadJob> job_; |
| 705 | 712 |
| 706 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 713 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 707 | 714 |
| 708 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 715 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 709 }; | 716 }; |
| 710 | 717 |
| 711 } // namespace content | 718 } // namespace content |
| 712 | 719 |
| 713 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 720 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |