Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_FILE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/browser/download/download_file.h" | 9 #include "content/browser/download/download_file.h" |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "content/browser/download/base_file.h" | 12 #include "content/browser/download/base_file.h" |
| 13 #include "content/browser/download/download_request_handle.h" | 13 #include "content/browser/download/download_request_handle.h" |
| 14 | 14 |
| 15 struct DownloadCreateInfo; | 15 struct DownloadCreateInfo; |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 class DownloadManager; | 18 class DownloadManager; |
| 19 } | 19 } |
| 20 | 20 |
| 21 class CONTENT_EXPORT DownloadFileImpl : virtual public content::DownloadFile { | 21 class CONTENT_EXPORT DownloadFileImpl : virtual public content::DownloadFile { |
| 22 public: | 22 public: |
| 23 // Takes ownership of the object pointed to by |request_handle|. | 23 // Takes ownership of the object pointed to by |request_handle|. |
| 24 DownloadFileImpl(const DownloadCreateInfo* info, | 24 DownloadFileImpl(const DownloadCreateInfo* info, |
| 25 DownloadRequestHandleInterface* request_handle, | 25 DownloadRequestHandleInterface* request_handle, |
| 26 content::DownloadManager* download_manager, | 26 content::DownloadManager* download_manager, |
| 27 bool calculate_hash); | 27 bool calculate_hash, |
| 28 const net::BoundNetLog& bound_net_log); | |
|
Randy Smith (Not in Mondays)
2012/02/07 23:19:14
Comment indicating that this is the bound_net_log
ahendrickson
2012/02/07 23:58:54
Done.
| |
| 28 virtual ~DownloadFileImpl(); | 29 virtual ~DownloadFileImpl(); |
| 29 | 30 |
| 30 // DownloadFile functions. | 31 // DownloadFile functions. |
| 31 virtual net::Error Initialize() OVERRIDE; | 32 virtual net::Error Initialize() OVERRIDE; |
| 32 virtual net::Error AppendDataToFile(const char* data, | 33 virtual net::Error AppendDataToFile(const char* data, |
| 33 size_t data_len) OVERRIDE; | 34 size_t data_len) OVERRIDE; |
| 34 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; | 35 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; |
| 35 virtual void Detach() OVERRIDE; | 36 virtual void Detach() OVERRIDE; |
| 36 virtual void Cancel() OVERRIDE; | 37 virtual void Cancel() OVERRIDE; |
| 37 virtual void Finish() OVERRIDE; | 38 virtual void Finish() OVERRIDE; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 60 // download system, specifically canceling a download. | 61 // download system, specifically canceling a download. |
| 61 scoped_ptr<DownloadRequestHandleInterface> request_handle_; | 62 scoped_ptr<DownloadRequestHandleInterface> request_handle_; |
| 62 | 63 |
| 63 // DownloadManager this download belongs to. | 64 // DownloadManager this download belongs to. |
| 64 scoped_refptr<content::DownloadManager> download_manager_; | 65 scoped_refptr<content::DownloadManager> download_manager_; |
| 65 | 66 |
| 66 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 67 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 70 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |