| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 virtual void RenameAndAnnotate( | 56 virtual void RenameAndAnnotate( |
| 57 const base::FilePath& full_path, | 57 const base::FilePath& full_path, |
| 58 const RenameCompletionCallback& callback) OVERRIDE; | 58 const RenameCompletionCallback& callback) OVERRIDE; |
| 59 virtual void Detach() OVERRIDE; | 59 virtual void Detach() OVERRIDE; |
| 60 virtual void Cancel() OVERRIDE; | 60 virtual void Cancel() OVERRIDE; |
| 61 virtual base::FilePath FullPath() const OVERRIDE; | 61 virtual base::FilePath FullPath() const OVERRIDE; |
| 62 virtual bool InProgress() const OVERRIDE; | 62 virtual bool InProgress() const OVERRIDE; |
| 63 virtual int64 CurrentSpeed() const OVERRIDE; | 63 virtual int64 CurrentSpeed() const OVERRIDE; |
| 64 virtual bool GetHash(std::string* hash) OVERRIDE; | 64 virtual bool GetHash(std::string* hash) OVERRIDE; |
| 65 virtual std::string GetHashState() OVERRIDE; | 65 virtual std::string GetHashState() OVERRIDE; |
| 66 virtual void SetClientGuid(const std::string& guid) OVERRIDE; |
| 66 | 67 |
| 67 protected: | 68 protected: |
| 68 // For test class overrides. | 69 // For test class overrides. |
| 69 virtual DownloadInterruptReason AppendDataToFile( | 70 virtual DownloadInterruptReason AppendDataToFile( |
| 70 const char* data, size_t data_len); | 71 const char* data, size_t data_len); |
| 71 | 72 |
| 72 private: | 73 private: |
| 73 // Send an update on our progress. | 74 // Send an update on our progress. |
| 74 void SendUpdate(); | 75 void SendUpdate(); |
| 75 | 76 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 106 | 107 |
| 107 // RAII handle to keep the system from sleeping while we're downloading. | 108 // RAII handle to keep the system from sleeping while we're downloading. |
| 108 scoped_ptr<PowerSaveBlocker> power_save_blocker_; | 109 scoped_ptr<PowerSaveBlocker> power_save_blocker_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 111 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 } // namespace content | 114 } // namespace content |
| 114 | 115 |
| 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 116 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |