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 25 matching lines...) Expand all Loading... |
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; |
43 virtual void Rename(const FilePath& full_path, | 43 virtual void Rename(const FilePath& full_path, |
44 bool overwrite_existing_file, | 44 bool overwrite_existing_file, |
45 const RenameCompletionCallback& callback) OVERRIDE; | 45 const RenameCompletionCallback& callback) OVERRIDE; |
46 virtual void Detach() OVERRIDE; | 46 virtual void Detach(base::Closure callback) OVERRIDE; |
47 virtual void Cancel() OVERRIDE; | 47 virtual void Cancel() OVERRIDE; |
48 virtual void AnnotateWithSourceInformation() OVERRIDE; | 48 virtual void AnnotateWithSourceInformation() OVERRIDE; |
49 virtual FilePath FullPath() const OVERRIDE; | 49 virtual FilePath FullPath() const OVERRIDE; |
50 virtual bool InProgress() const OVERRIDE; | 50 virtual bool InProgress() const OVERRIDE; |
51 virtual int64 BytesSoFar() const OVERRIDE; | 51 virtual int64 BytesSoFar() const OVERRIDE; |
52 virtual int64 CurrentSpeed() const OVERRIDE; | 52 virtual int64 CurrentSpeed() const OVERRIDE; |
53 virtual bool GetHash(std::string* hash) OVERRIDE; | 53 virtual bool GetHash(std::string* hash) OVERRIDE; |
54 virtual std::string GetHashState() OVERRIDE; | 54 virtual std::string GetHashState() OVERRIDE; |
55 virtual void CancelDownloadRequest() OVERRIDE; | 55 virtual void CancelDownloadRequest() OVERRIDE; |
56 virtual int Id() const OVERRIDE; | 56 virtual int Id() const OVERRIDE; |
(...skipping 49 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 |