| 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 24 matching lines...) Expand all Loading... |
| 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); | 41 bool GetHash(std::string* hash); |
| 42 std::string DebugString() const; | 42 std::string DebugString() const; |
| 43 | 43 |
| 44 // Accessors. | 44 // Accessors. |
| 45 int save_item_id() const { return info_->save_item_id; } | 45 SaveItemId save_item_id() const { return info_->save_item_id; } |
| 46 int render_process_id() const { return info_->render_process_id; } | 46 int render_process_id() const { return info_->render_process_id; } |
| 47 int request_id() const { return info_->request_id; } | 47 int request_id() const { return info_->request_id; } |
| 48 SaveFileCreateInfo::SaveFileSource save_source() const { | 48 SaveFileCreateInfo::SaveFileSource save_source() const { |
| 49 return info_->save_source; | 49 return info_->save_source; |
| 50 } | 50 } |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 BaseFile file_; | 53 BaseFile file_; |
| 54 scoped_ptr<const SaveFileCreateInfo> info_; | 54 scoped_ptr<const SaveFileCreateInfo> info_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(SaveFile); | 56 DISALLOW_COPY_AND_ASSIGN(SaveFile); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace content | 59 } // namespace content |
| 60 | 60 |
| 61 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ | 61 #endif // CONTENT_BROWSER_DOWNLOAD_SAVE_FILE_H_ |
| OLD | NEW |