summaryrefslogtreecommitdiffstats
path: root/webkit/blob/blob_url_request_job.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/blob/blob_url_request_job.cc')
-rw-r--r--webkit/blob/blob_url_request_job.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc
index ef2fcc6..5103458 100644
--- a/webkit/blob/blob_url_request_job.cc
+++ b/webkit/blob/blob_url_request_job.cc
@@ -106,19 +106,24 @@ void BlobURLRequestJob::ResolveFile(const FilePath& file_path) {
// Continue asynchronously.
MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(
- this, &BlobURLRequestJob::DidResolve, exists, file_info));
+ this, &BlobURLRequestJob::DidResolve,
+ (exists ? base::PLATFORM_FILE_OK : base::PLATFORM_FILE_ERROR_NOT_FOUND),
+ file_info));
}
-void BlobURLRequestJob::DidResolve(
- bool exists, const file_util::FileInfo& file_info) {
+void BlobURLRequestJob::DidResolve(base::PlatformFileError rv,
+ const file_util::FileInfo& file_info) {
// We may have been orphaned...
if (!request_)
return;
- // If the file does not exist, bail out.
- if (!exists) {
+ // If an error occured, bail out.
+ if (rv == base::PLATFORM_FILE_ERROR_NOT_FOUND) {
NotifyFailure(net::ERR_FILE_NOT_FOUND);
return;
+ } else if (rv != base::PLATFORM_FILE_OK) {
+ NotifyFailure(net::ERR_FAILED);
+ return;
}
// Validate the expected modification time.