| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 202 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
| 203 virtual content::WebContents* GetWebContents() const OVERRIDE; | 203 virtual content::WebContents* GetWebContents() const OVERRIDE; |
| 204 virtual FilePath GetTargetFilePath() const OVERRIDE; | 204 virtual FilePath GetTargetFilePath() const OVERRIDE; |
| 205 virtual FilePath GetFileNameToReportUser() const OVERRIDE; | 205 virtual FilePath GetFileNameToReportUser() const OVERRIDE; |
| 206 virtual FilePath GetUserVerifiedFilePath() const OVERRIDE; | 206 virtual FilePath GetUserVerifiedFilePath() const OVERRIDE; |
| 207 virtual bool NeedsRename() const OVERRIDE; | 207 virtual bool NeedsRename() const OVERRIDE; |
| 208 virtual void OffThreadCancel(DownloadFileManager* file_manager) OVERRIDE; | 208 virtual void OffThreadCancel(DownloadFileManager* file_manager) OVERRIDE; |
| 209 virtual std::string DebugString(bool verbose) const OVERRIDE; | 209 virtual std::string DebugString(bool verbose) const OVERRIDE; |
| 210 virtual void MockDownloadOpenForTesting() OVERRIDE; | 210 virtual void MockDownloadOpenForTesting() OVERRIDE; |
| 211 virtual ExternalData* GetExternalData(const void* key) OVERRIDE; | 211 virtual ExternalData* GetExternalData(const void* key) OVERRIDE; |
| 212 virtual const ExternalData* GetExternalData(const void* key) const OVERRIDE; |
| 212 virtual void SetExternalData(const void* key, ExternalData* data) OVERRIDE; | 213 virtual void SetExternalData(const void* key, ExternalData* data) OVERRIDE; |
| 213 | 214 |
| 214 private: | 215 private: |
| 215 // Construction common to all constructors. |active| should be true for new | 216 // Construction common to all constructors. |active| should be true for new |
| 216 // downloads and false for downloads from the history. | 217 // downloads and false for downloads from the history. |
| 217 // |download_type| indicates to the net log system what kind of download | 218 // |download_type| indicates to the net log system what kind of download |
| 218 // this is. | 219 // this is. |
| 219 void Init(bool active, download_net_logs::DownloadType download_type); | 220 void Init(bool active, download_net_logs::DownloadType download_type); |
| 220 | 221 |
| 221 // Internal helper for maintaining consistent received and total sizes, and | 222 // Internal helper for maintaining consistent received and total sizes, and |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 // are owned by the DownloadItemImpl. | 382 // are owned by the DownloadItemImpl. |
| 382 std::map<const void*, ExternalData*> external_data_map_; | 383 std::map<const void*, ExternalData*> external_data_map_; |
| 383 | 384 |
| 384 // Net log to use for this download. | 385 // Net log to use for this download. |
| 385 const net::BoundNetLog bound_net_log_; | 386 const net::BoundNetLog bound_net_log_; |
| 386 | 387 |
| 387 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); | 388 DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); |
| 388 }; | 389 }; |
| 389 | 390 |
| 390 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ | 391 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_IMPL_H_ |
| OLD | NEW |