OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
mmenke
2012/02/08 16:03:46
nit: Update year
ahendrickson
2012/02/08 18:16:10
Done.
| |
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 // |bound_net_log| will be used for logging the download file's events. | |
24 DownloadFileImpl(const DownloadCreateInfo* info, | 25 DownloadFileImpl(const DownloadCreateInfo* info, |
25 DownloadRequestHandleInterface* request_handle, | 26 DownloadRequestHandleInterface* request_handle, |
26 content::DownloadManager* download_manager, | 27 content::DownloadManager* download_manager, |
27 bool calculate_hash); | 28 bool calculate_hash, |
29 const net::BoundNetLog& bound_net_log); | |
28 virtual ~DownloadFileImpl(); | 30 virtual ~DownloadFileImpl(); |
29 | 31 |
30 // DownloadFile functions. | 32 // DownloadFile functions. |
31 virtual net::Error Initialize() OVERRIDE; | 33 virtual net::Error Initialize() OVERRIDE; |
32 virtual net::Error AppendDataToFile(const char* data, | 34 virtual net::Error AppendDataToFile(const char* data, |
33 size_t data_len) OVERRIDE; | 35 size_t data_len) OVERRIDE; |
34 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; | 36 virtual net::Error Rename(const FilePath& full_path) OVERRIDE; |
35 virtual void Detach() OVERRIDE; | 37 virtual void Detach() OVERRIDE; |
36 virtual void Cancel() OVERRIDE; | 38 virtual void Cancel() OVERRIDE; |
37 virtual void Finish() OVERRIDE; | 39 virtual void Finish() OVERRIDE; |
(...skipping 22 matching lines...) Expand all Loading... | |
60 // download system, specifically canceling a download. | 62 // download system, specifically canceling a download. |
61 scoped_ptr<DownloadRequestHandleInterface> request_handle_; | 63 scoped_ptr<DownloadRequestHandleInterface> request_handle_; |
62 | 64 |
63 // DownloadManager this download belongs to. | 65 // DownloadManager this download belongs to. |
64 scoped_refptr<content::DownloadManager> download_manager_; | 66 scoped_refptr<content::DownloadManager> download_manager_; |
65 | 67 |
66 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 68 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
67 }; | 69 }; |
68 | 70 |
69 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 71 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
OLD | NEW |