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

Unified Diff: extensions/browser/extension_protocols.cc

Issue 2779083005: Make content verification see 0-byte files. (Closed)
Patch Set: sync Created 3 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
« no previous file with comments | « chrome/browser/extensions/extension_protocols_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_protocols.cc
diff --git a/extensions/browser/extension_protocols.cc b/extensions/browser/extension_protocols.cc
index ccd37cdfb6cafef3d4e8bd48b3db145099482c03..ef0c65a5eb69b7396123bb41f469e7e38aeef68d 100644
--- a/extensions/browser/extension_protocols.cc
+++ b/extensions/browser/extension_protocols.cc
@@ -268,14 +268,17 @@ class URLRequestExtensionJob : public net::URLRequestFileJob {
-result);
if (result > 0) {
bytes_read_ += result;
- if (verify_job_.get()) {
+ if (verify_job_.get())
verify_job_->BytesRead(result, buffer->data());
- if (!remaining_bytes())
- verify_job_->DoneReading();
- }
}
}
+ void DoneReading() override {
+ URLRequestFileJob::DoneReading();
+ if (verify_job_.get())
+ verify_job_->DoneReading();
+ }
+
private:
~URLRequestExtensionJob() override {
UMA_HISTOGRAM_COUNTS("ExtensionUrlRequest.TotalKbRead", bytes_read_ / 1024);
« no previous file with comments | « chrome/browser/extensions/extension_protocols_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698