| 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_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 | 7 |
| 8 #include "content/browser/download/download_file.h" | 8 #include "content/browser/download/download_file.h" |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace content { | 22 namespace content { |
| 23 class ByteStreamReader; | 23 class ByteStreamReader; |
| 24 class DownloadManager; | 24 class DownloadManager; |
| 25 class PowerSaveBlocker; | 25 class PowerSaveBlocker; |
| 26 } | 26 } |
| 27 | 27 |
| 28 class CONTENT_EXPORT DownloadFileImpl : virtual public content::DownloadFile { | 28 class CONTENT_EXPORT DownloadFileImpl : virtual public content::DownloadFile { |
| 29 public: | 29 public: |
| 30 // Takes ownership of the object pointed to by |request_handle|. | 30 // Takes ownership of the object pointed to by |request_handle|. |
| 31 // |bound_net_log| will be used for logging the download file's events. | 31 // |bound_net_log| will be used for logging the download file's events. |
| 32 DownloadFileImpl(const DownloadCreateInfo* info, | 32 DownloadFileImpl(scoped_ptr<DownloadCreateInfo> info, |
| 33 scoped_ptr<content::ByteStreamReader> stream, | 33 scoped_ptr<content::ByteStreamReader> stream, |
| 34 DownloadRequestHandleInterface* request_handle, | 34 DownloadRequestHandleInterface* request_handle, |
| 35 scoped_refptr<content::DownloadManager> download_manager, | 35 scoped_refptr<content::DownloadManager> download_manager, |
| 36 bool calculate_hash, | 36 bool calculate_hash, |
| 37 scoped_ptr<content::PowerSaveBlocker> power_save_blocker, | 37 scoped_ptr<content::PowerSaveBlocker> power_save_blocker, |
| 38 const net::BoundNetLog& bound_net_log); | 38 const net::BoundNetLog& bound_net_log); |
| 39 virtual ~DownloadFileImpl(); | 39 virtual ~DownloadFileImpl(); |
| 40 | 40 |
| 41 // DownloadFile functions. | 41 // DownloadFile functions. |
| 42 virtual content::DownloadInterruptReason Initialize() OVERRIDE; | 42 virtual content::DownloadInterruptReason Initialize() OVERRIDE; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; | 107 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; |
| 108 | 108 |
| 109 // RAII handle to keep the system from sleeping while we're downloading. | 109 // RAII handle to keep the system from sleeping while we're downloading. |
| 110 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; | 110 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 112 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |