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

Unified Diff: net/http/http_cache_transaction.cc

Issue 22926031: Sparse IO: Allow failover to network in debug builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index cd3be51cb85e011beb11c1b85b7c9257d136d922..4d7aae0e60bf2a7b5d3b641232710539b058469c 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1530,6 +1530,20 @@ int HttpCache::Transaction::DoCacheQueryData() {
}
int HttpCache::Transaction::DoCacheQueryDataComplete(int result) {
+#if defined(OS_ANDROID)
+ if (result == ERR_NOT_IMPLEMENTED) {
+ // Restart the request overwriting the cache entry.
+ //
+ // Note: this would have fixed range requests for debug builds on all OSes,
+ // not just Android, but karen@ prefers to limit the effect based on OS for
+ // cherry-picked fixes.
+ // TODO(pasko): remove the OS_ANDROID limitation as soon as the fix proves
+ // useful after the cherry-pick.
+ // TODO(pasko): remove this workaround as soon as the SimpleBackendImpl
+ // supports Sparse IO.
+ return DoRestartPartialRequest();
+ }
+#endif
DCHECK_EQ(OK, result);
if (!cache_.get())
return ERR_UNEXPECTED;

Powered by Google App Engine
This is Rietveld 408576698