Chromium Code Reviews| Index: content/browser/download/base_file.h |
| diff --git a/content/browser/download/base_file.h b/content/browser/download/base_file.h |
| index 7076ef146678274ecb28fa62c4a57f5df583431b..e4ac541746d1a7cc8dbe25153d6c8a59ec981411 100644 |
| --- a/content/browser/download/base_file.h |
| +++ b/content/browser/download/base_file.h |
| @@ -63,7 +63,17 @@ class CONTENT_EXPORT BaseFile { |
| bool in_progress() const { return file_stream_ != NULL; } |
| int64 bytes_so_far() const { return bytes_so_far_; } |
| - // Set |hash| with sha256 digest for the file. |
| + // Copies the current sha256 digest for the file into |hash|. May be partial. |
| + // Used to save the hash in the case of download resumption. |
| + // Returns true on success, false on failure. |
| + bool GetPartialSha256Hash(std::string* hash); |
|
Randy Smith (Not in Mondays)
2011/10/31 18:46:43
I'd like to look at combining the concepts of part
ahendrickson
2011/11/13 21:15:20
Done.
|
| + |
| + // Sets the sha256 digest for the file from |hash|. |
| + // Used to restore the hash in the case of download resumption. |
| + // Returns true on success, false on failure. |
| + bool SetPartialSha256Hash(const std::string& hash); |
|
Randy Smith (Not in Mondays)
2011/10/31 18:46:43
Hmmm. This feels like something that's relevant o
ahendrickson
2011/11/13 21:15:20
I'd like to be able to set the partial hash in uni
Randy Smith (Not in Mondays)
2011/11/15 18:35:25
Why can't that be done in the constructor?
ahendrickson
2011/11/16 15:41:08
Done.
|
| + |
| + // Sets |hash| with sha256 digest for the file. |
| // Returns true if digest is successfully calculated. |
| virtual bool GetSha256Hash(std::string* hash); |