| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 66 |
| 67 // Set the application GUID to be used to identify the app to the |
| 68 // system AV function when scanning downloaded files. Should be called |
| 69 // before RenameAndAnnotate() to take effect. |
| 70 virtual void SetClientGuid(const std::string& guid) OVERRIDE; |
| 71 |
| 67 protected: | 72 protected: |
| 68 // For test class overrides. | 73 // For test class overrides. |
| 69 virtual DownloadInterruptReason AppendDataToFile( | 74 virtual DownloadInterruptReason AppendDataToFile( |
| 70 const char* data, size_t data_len); | 75 const char* data, size_t data_len); |
| 71 | 76 |
| 72 private: | 77 private: |
| 73 // Send an update on our progress. | 78 // Send an update on our progress. |
| 74 void SendUpdate(); | 79 void SendUpdate(); |
| 75 | 80 |
| 76 // Called when there's some activity on stream_reader_ that needs to be | 81 // Called when there's some activity on stream_reader_ that needs to be |
| (...skipping 29 matching lines...) Expand all Loading... |
| 106 | 111 |
| 107 // RAII handle to keep the system from sleeping while we're downloading. | 112 // RAII handle to keep the system from sleeping while we're downloading. |
| 108 scoped_ptr<PowerSaveBlocker> power_save_blocker_; | 113 scoped_ptr<PowerSaveBlocker> power_save_blocker_; |
| 109 | 114 |
| 110 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); | 115 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); |
| 111 }; | 116 }; |
| 112 | 117 |
| 113 } // namespace content | 118 } // namespace content |
| 114 | 119 |
| 115 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ | 120 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ |
| OLD | NEW |