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

Unified Diff: webkit/fileapi/file_writer_delegate.cc

Issue 9007055: Check response code before writing blob to file. (Closed) Base URL: git://localhost/chromium.git@master
Patch Set: '' Created 8 years, 12 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: webkit/fileapi/file_writer_delegate.cc
diff --git a/webkit/fileapi/file_writer_delegate.cc b/webkit/fileapi/file_writer_delegate.cc
index 4bd1fc3ca51f948cb46752fb58518f057fa8c1d1..c2de08160fc803097c438c9d6a9c4dfe5fca029d 100644
--- a/webkit/fileapi/file_writer_delegate.cc
+++ b/webkit/fileapi/file_writer_delegate.cc
@@ -169,7 +169,7 @@ void FileWriterDelegate::OnResponseStarted(net::URLRequest* request) {
// file_stream_->Seek() blocks the IO thread.
// See http://crbug.com/75548.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- if (!request->status().is_success()) {
+ if (!request->status().is_success() || request->GetResponseCode() != 200) {
ericu 2012/01/05 05:47:20 Why is is_success true here, if the blob wasn't va
tzik 2012/01/05 06:59:45 Looking at other use of URLRequestStatus, !is_succ
OnError(base::PLATFORM_FILE_ERROR_FAILED);
return;
}
« no previous file with comments | « webkit/fileapi/file_system_operation_write_unittest.cc ('k') | webkit/fileapi/file_writer_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698