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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 virtual std::string DebugString(bool verbose) const OVERRIDE; | 156 virtual std::string DebugString(bool verbose) const OVERRIDE; |
157 | 157 |
158 // All remaining public interfaces virtual to allow for DownloadItemImpl | 158 // All remaining public interfaces virtual to allow for DownloadItemImpl |
159 // mocks. | 159 // mocks. |
160 | 160 |
161 // Determines the resume mode for an interrupted download. Requires | 161 // Determines the resume mode for an interrupted download. Requires |
162 // last_reason_ to be set, but doesn't require the download to be in | 162 // last_reason_ to be set, but doesn't require the download to be in |
163 // INTERRUPTED state. | 163 // INTERRUPTED state. |
164 virtual ResumeMode GetResumeMode() const; | 164 virtual ResumeMode GetResumeMode() const; |
165 | 165 |
| 166 // Notify the download item that new origin information is available due to a |
| 167 // resumption request receiving a response. |
| 168 virtual void MergeOriginInfoOnResume( |
| 169 const DownloadCreateInfo& new_create_info); |
| 170 |
166 // State transition operations on regular downloads -------------------------- | 171 // State transition operations on regular downloads -------------------------- |
167 | 172 |
168 // Start the download. | 173 // Start the download. |
169 // |download_file| is the associated file on the storage medium. | 174 // |download_file| is the associated file on the storage medium. |
170 // |req_handle| is the new request handle associated with the download. | 175 // |req_handle| is the new request handle associated with the download. |
171 virtual void Start(scoped_ptr<DownloadFile> download_file, | 176 virtual void Start(scoped_ptr<DownloadFile> download_file, |
172 scoped_ptr<DownloadRequestHandleInterface> req_handle); | 177 scoped_ptr<DownloadRequestHandleInterface> req_handle); |
173 | 178 |
174 // Needed because of intertwining with DownloadManagerImpl ------------------- | 179 // Needed because of intertwining with DownloadManagerImpl ------------------- |
175 | 180 |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 const net::BoundNetLog bound_net_log_; | 542 const net::BoundNetLog bound_net_log_; |
538 | 543 |
539 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; | 544 base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_; |
540 | 545 |
541 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 546 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
542 }; | 547 }; |
543 | 548 |
544 } // namespace content | 549 } // namespace content |
545 | 550 |
546 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 551 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
OLD | NEW |