summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/base/net_error_list.h7
-rw-r--r--net/http/http_cache.cc4
2 files changed, 9 insertions, 2 deletions
diff --git a/net/base/net_error_list.h b/net/base/net_error_list.h
index 30ab98e..6265895 100644
--- a/net/base/net_error_list.h
+++ b/net/base/net_error_list.h
@@ -243,5 +243,12 @@ NET_ERROR(REQUEST_RANGE_NOT_SATISFIABLE, -328)
// The cache does not have the requested entry.
NET_ERROR(CACHE_MISS, -400)
+// Unable to read from the disk cache.
+NET_ERROR(CACHE_READ_FAILURE, -401)
+
+// The network transaction factory of the cache was not able to create a new
+// transaction.
+NET_ERROR(CACHE_CANNOT_CREATE_NETWORK_TRANSACTION, -402)
+
// The server's response was insecure (e.g. there was a cert error).
NET_ERROR(INSECURE_RESPONSE, -501)
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index 46bb64c..a5078de 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -688,7 +688,7 @@ int HttpCache::Transaction::BeginNetworkRequest() {
network_trans_.reset(cache_->network_layer_->CreateTransaction());
if (!network_trans_.get())
- return net::ERR_FAILED;
+ return net::ERR_CACHE_CANNOT_CREATE_NETWORK_TRANSACTION;
int rv = network_trans_->Start(request_, &network_info_callback_);
if (rv != ERR_IO_PENDING)
@@ -785,7 +785,7 @@ int HttpCache::Transaction::ReadResponseInfoFromEntry() {
DCHECK(entry_);
if (!HttpCache::ReadResponseInfo(entry_->disk_entry, &response_))
- return ERR_FAILED;
+ return ERR_CACHE_READ_FAILURE;
// If the cache object is used for media file, we want the file handle of
// response data.