| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 base::Time GetStartTime() const override; | 152 base::Time GetStartTime() const override; |
| 153 base::Time GetEndTime() const override; | 153 base::Time GetEndTime() const override; |
| 154 bool CanShowInFolder() override; | 154 bool CanShowInFolder() override; |
| 155 bool CanOpenDownload() override; | 155 bool CanOpenDownload() override; |
| 156 bool ShouldOpenFileBasedOnExtension() override; | 156 bool ShouldOpenFileBasedOnExtension() override; |
| 157 bool GetOpenWhenComplete() const override; | 157 bool GetOpenWhenComplete() const override; |
| 158 bool GetAutoOpened() override; | 158 bool GetAutoOpened() override; |
| 159 bool GetOpened() const override; | 159 bool GetOpened() const override; |
| 160 BrowserContext* GetBrowserContext() const override; | 160 BrowserContext* GetBrowserContext() const override; |
| 161 WebContents* GetWebContents() const override; | 161 WebContents* GetWebContents() const override; |
| 162 void OnContentCheckCompleted(DownloadDangerType danger_type) override; | 162 void OnContentCheckCompleted(DownloadDangerType danger_type, |
| 163 const std::string& token) override; |
| 163 void SetOpenWhenComplete(bool open) override; | 164 void SetOpenWhenComplete(bool open) override; |
| 164 void SetIsTemporary(bool temporary) override; | 165 void SetIsTemporary(bool temporary) override; |
| 165 void SetOpened(bool opened) override; | 166 void SetOpened(bool opened) override; |
| 166 void SetDisplayName(const base::FilePath& name) override; | 167 void SetDisplayName(const base::FilePath& name) override; |
| 168 std::string GetDownloadPingToken() const override; |
| 167 std::string DebugString(bool verbose) const override; | 169 std::string DebugString(bool verbose) const override; |
| 168 | 170 |
| 169 // All remaining public interfaces virtual to allow for DownloadItemImpl | 171 // All remaining public interfaces virtual to allow for DownloadItemImpl |
| 170 // mocks. | 172 // mocks. |
| 171 | 173 |
| 172 // Determines the resume mode for an interrupted download. Requires | 174 // Determines the resume mode for an interrupted download. Requires |
| 173 // last_reason_ to be set, but doesn't require the download to be in | 175 // last_reason_ to be set, but doesn't require the download to be in |
| 174 // INTERRUPTED state. | 176 // INTERRUPTED state. |
| 175 virtual ResumeMode GetResumeMode() const; | 177 virtual ResumeMode GetResumeMode() const; |
| 176 | 178 |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 670 | 672 |
| 671 // Contents of the Last-Modified header for the most recent server response. | 673 // Contents of the Last-Modified header for the most recent server response. |
| 672 std::string last_modified_time_; | 674 std::string last_modified_time_; |
| 673 | 675 |
| 674 // Server's ETAG for the file. | 676 // Server's ETAG for the file. |
| 675 std::string etag_; | 677 std::string etag_; |
| 676 | 678 |
| 677 // Net log to use for this download. | 679 // Net log to use for this download. |
| 678 const net::BoundNetLog bound_net_log_; | 680 const net::BoundNetLog bound_net_log_; |
| 679 | 681 |
| 682 // Token from ClientDownloadResponse used to identify download ping. |
| 683 std::string token_; |
| 684 |
| 680 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 685 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
| 681 | 686 |
| 682 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 687 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 683 }; | 688 }; |
| 684 | 689 |
| 685 } // namespace content | 690 } // namespace content |
| 686 | 691 |
| 687 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 692 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |