diff options
author | Kristian Monsen <kristianm@google.com> | 2011-11-17 03:22:20 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-17 03:22:20 -0800 |
commit | 3a14c9bbe51d89a2d6435c3cec12f59675bde0a8 (patch) | |
tree | 7b38289e7ab762063311206a4297fcd1f35546fb /net/disk_cache/file_posix.cc | |
parent | 2eabaec57ce0053fc96db1c4ac4251a769d3363e (diff) | |
parent | 93bed14e13dd5a6dd3d68bcf6d3c7c1f691f669b (diff) | |
download | external_chromium-3a14c9bbe51d89a2d6435c3cec12f59675bde0a8.zip external_chromium-3a14c9bbe51d89a2d6435c3cec12f59675bde0a8.tar.gz external_chromium-3a14c9bbe51d89a2d6435c3cec12f59675bde0a8.tar.bz2 |
am 93bed14e: Part of fix for bug 5523834, backporting cache fixes
* commit '93bed14e13dd5a6dd3d68bcf6d3c7c1f691f669b':
Part of fix for bug 5523834, backporting cache fixes
Diffstat (limited to 'net/disk_cache/file_posix.cc')
-rw-r--r-- | net/disk_cache/file_posix.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/file_posix.cc index 087ff13..71fc1fb 100644 --- a/net/disk_cache/file_posix.cc +++ b/net/disk_cache/file_posix.cc @@ -8,6 +8,7 @@ #include "base/logging.h" #include "base/threading/worker_pool.h" +#include "net/base/net_errors.h" #include "net/disk_cache/disk_cache.h" #include "net/disk_cache/in_flight_io.h" @@ -92,7 +93,7 @@ void FileBackgroundIO::Read() { if (file_->Read(const_cast<void*>(buf_), buf_len_, offset_)) { result_ = static_cast<int>(buf_len_); } else { - result_ = -1; + result_ = net::ERR_CACHE_READ_FAILURE; } controller_->OnIOComplete(this); } @@ -101,7 +102,7 @@ void FileBackgroundIO::Read() { void FileBackgroundIO::Write() { bool rv = file_->Write(buf_, buf_len_, offset_); - result_ = rv ? static_cast<int>(buf_len_) : -1; + result_ = rv ? static_cast<int>(buf_len_) : net::ERR_CACHE_WRITE_FAILURE; controller_->OnIOComplete(this); } |