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

Unified Diff: extensions/browser/extension_protocols.cc

Issue 2771953003: Fix content verification code for undreadable and deleted files. (Closed)
Patch Set: . 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
Index: extensions/browser/extension_protocols.cc
diff --git a/extensions/browser/extension_protocols.cc b/extensions/browser/extension_protocols.cc
index 551064cbd784250c1073044c80fd3b3f5fb5c512..ec417a38ad539b553cca3487e3e35a0dfac7d883 100644
--- a/extensions/browser/extension_protocols.cc
+++ b/extensions/browser/extension_protocols.cc
@@ -237,6 +237,16 @@ class URLRequestExtensionJob : public net::URLRequestFileJob {
URLRequestFileJob::SetExtraRequestHeaders(headers);
}
+ void OnOpenComplete(int result) override {
+ if (result < 0) {
Devlin 2017/03/24 02:01:45 This block would benefit from some comments. :)
lazyboy 2017/03/24 18:27:47 Done.
+ if (verify_job_.get()) {
+ std::string tmp;
+ verify_job_->BytesRead(0, base::string_as_array(&tmp));
+ verify_job_->DoneReading();
+ }
+ }
+ }
+
void OnSeekComplete(int64_t result) override {
DCHECK_EQ(seek_position_, 0);
seek_position_ = result;

Powered by Google App Engine
This is Rietveld 408576698