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

Unified Diff: webkit/appcache/appcache_url_request_job.cc

Issue 3187017: When an individual entry is lost from the appache's diskcache, attempts to lo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
« no previous file with comments | « webkit/appcache/appcache_url_request_job.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/appcache/appcache_url_request_job.cc
===================================================================
--- webkit/appcache/appcache_url_request_job.cc (revision 57090)
+++ webkit/appcache/appcache_url_request_job.cc (working copy)
@@ -23,8 +23,8 @@
: URLRequestJob(request), storage_(storage),
has_been_started_(false), has_been_killed_(false),
delivery_type_(AWAITING_DELIVERY_ORDERS),
- cache_id_(kNoCacheId),
- is_fallback_(false),
+ cache_id_(kNoCacheId), is_fallback_(false),
+ cache_entry_not_found_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(read_callback_(
this, &AppCacheURLRequestJob::OnReadComplete)) {
DCHECK(storage_);
@@ -122,8 +122,13 @@
NotifyHeadersComplete();
} else {
- NotifyStartError(
- URLRequestStatus(URLRequestStatus::FAILED, net::ERR_FAILED));
+ // A resource that is expected to be in the appcache is missing.
+ // See http://code.google.com/p/chromium/issues/detail?id=50657
+ // Instead of failing the request, we restart the request. The retry
+ // attempt will fallthru to the network instead of trying to load
+ // from the appcache.
+ cache_entry_not_found_ = true;
+ NotifyRestartRequired();
}
storage_ = NULL; // no longer needed
}
« no previous file with comments | « webkit/appcache/appcache_url_request_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698