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

Side by Side Diff: content/browser/download/base_file.h

Issue 1591523002: [Downloads] Avoid resetting SecureHash state across an interruption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/download/base_file.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_BASE_FILE_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 // Detach the file so it is not deleted on destruction. 69 // Detach the file so it is not deleted on destruction.
70 virtual void Detach(); 70 virtual void Detach();
71 71
72 // Abort the download and automatically close the file. 72 // Abort the download and automatically close the file.
73 void Cancel(); 73 void Cancel();
74 74
75 // Indicate that the download has finished. No new data will be received. 75 // Indicate that the download has finished. No new data will be received.
76 void Finish(); 76 void Finish();
77 77
78 // Indicate that the download is being aborted due to an error. This is
79 // identical to Finish() with the exception that the hash state will not be
80 // finalized.
81 void FinishWithError();
82
78 // Set the client guid which will be used to identify the app to the 83 // Set the client guid which will be used to identify the app to the
79 // system AV scanning function. Should be called before 84 // system AV scanning function. Should be called before
80 // AnnotateWithSourceInformation() to take effect. 85 // AnnotateWithSourceInformation() to take effect.
81 void SetClientGuid(const std::string& guid); 86 void SetClientGuid(const std::string& guid);
82 87
83 // Informs the OS that this file came from the internet. Returns a 88 // Informs the OS that this file came from the internet. Returns a
84 // DownloadInterruptReason indicating the result of the operation. 89 // DownloadInterruptReason indicating the result of the operation.
85 // Note: SetClientGuid() should be called before this function on 90 // Note: SetClientGuid() should be called before this function on
86 // Windows to ensure the correct app client ID is available. 91 // Windows to ensure the correct app client ID is available.
87 DownloadInterruptReason AnnotateWithSourceInformation(); 92 DownloadInterruptReason AnnotateWithSourceInformation();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 bool detached_; 189 bool detached_;
185 190
186 net::BoundNetLog bound_net_log_; 191 net::BoundNetLog bound_net_log_;
187 192
188 DISALLOW_COPY_AND_ASSIGN(BaseFile); 193 DISALLOW_COPY_AND_ASSIGN(BaseFile);
189 }; 194 };
190 195
191 } // namespace content 196 } // namespace content
192 197
193 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_ 198 #endif // CONTENT_BROWSER_DOWNLOAD_BASE_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/base_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698