Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(963)

Unified Diff: content/public/browser/download_item.h

Issue 1751603002: [Downloads] Rework how hashes are calculated for download files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on top of https://codereview.chromium.org/1781983002 since that's going in first. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/public/browser/download_item.h
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
index 31b03527ad349723cf3281b87aa59a25cfbc7d35..6182cd4185b6e38e4bb511dd3fe834d3f5fecd30 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -82,8 +82,6 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
static const uint32_t kInvalidId;
- static const char kEmptyFileHash[];
-
// Interface that observers of a particular download must implement in order
// to receive updates to the download's status.
class CONTENT_EXPORT Observer {
@@ -239,13 +237,12 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
virtual TargetDisposition GetTargetDisposition() const = 0;
- // Final hash of completely downloaded file; not valid if
- // GetState() != COMPLETED.
+ // Final hash of completely downloaded file, or partial hash of an interrupted
+ // download; only valid if GetState() == COMPLETED or INTERRUPTED. If
+ // non-empty the returned string contains a raw SHA-256 hash (i.e. not hex
+ // encoded).
virtual const std::string& GetHash() const = 0;
- // Intermediate hash state, for persisting partial downloads.
- virtual const std::string& GetHashState() const = 0;
-
// True if the file associated with the download has been removed by
// external action.
virtual bool GetFileExternallyRemoved() const = 0;
« no previous file with comments | « content/public/browser/download_interrupt_reason_values.h ('k') | content/public/browser/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698