| 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_SAVE_FILE_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 DownloadInterruptReason Initialize(); | 31 DownloadInterruptReason Initialize(); |
| 32 DownloadInterruptReason AppendDataToFile(const char* data, size_t data_len); | 32 DownloadInterruptReason AppendDataToFile(const char* data, size_t data_len); |
| 33 DownloadInterruptReason Rename(const base::FilePath& full_path); | 33 DownloadInterruptReason Rename(const base::FilePath& full_path); |
| 34 void Detach(); | 34 void Detach(); |
| 35 void Cancel(); | 35 void Cancel(); |
| 36 void Finish(); | 36 void Finish(); |
| 37 void AnnotateWithSourceInformation(); | 37 void AnnotateWithSourceInformation(); |
| 38 base::FilePath FullPath() const; | 38 base::FilePath FullPath() const; |
| 39 bool InProgress() const; | 39 bool InProgress() const; |
| 40 int64_t BytesSoFar() const; | 40 int64_t BytesSoFar() const; |
| 41 bool GetHash(std::string* hash); | |
| 42 std::string DebugString() const; | 41 std::string DebugString() const; |
| 43 | 42 |
| 44 // Accessors. | 43 // Accessors. |
| 45 SaveItemId save_item_id() const { return info_->save_item_id; } | 44 SaveItemId save_item_id() const { return info_->save_item_id; } |
| 46 int render_process_id() const { return info_->render_process_id; } | 45 int render_process_id() const { return info_->render_process_id; } |
| 47 int request_id() const { return info_->request_id; } | 46 int request_id() const { return info_->request_id; } |
| 48 SaveFileCreateInfo::SaveFileSource save_source() const { | 47 SaveFileCreateInfo::SaveFileSource save_source() const { |
| 49 return info_->save_source; | 48 return info_->save_source; |
| 50 } | 49 } |
| 51 | 50 |
| 52 private: | 51 private: |
| 53 BaseFile file_; | 52 BaseFile file_; |
| 54 scoped_ptr<const SaveFileCreateInfo> info_; | 53 scoped_ptr<const SaveFileCreateInfo> info_; |
| 55 | 54 |
| 56 DISALLOW_COPY_AND_ASSIGN(SaveFile); | 55 DISALLOW_COPY_AND_ASSIGN(SaveFile); |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 } // namespace content | 58 } // namespace content |
| 60 | 59 |
| 61 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ | 60 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ |
| OLD | NEW |