summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorpasko@chromium.org <pasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 22:33:05 +0000
committerpasko@chromium.org <pasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 22:33:05 +0000
commitb38eaf53db5ff07f68843ede2a1f01504321d5df (patch)
tree78a8f8353a591d3dd5dea0a147fb9722d6287036 /net
parente698eff64a94c5fc068280d673381e346c93839b (diff)
downloadchromium_src-b38eaf53db5ff07f68843ede2a1f01504321d5df.zip
chromium_src-b38eaf53db5ff07f68843ede2a1f01504321d5df.tar.gz
chromium_src-b38eaf53db5ff07f68843ede2a1f01504321d5df.tar.bz2
Cleanup: remove OS_ANDROID condition for sparse IO
The conditional compilation for OS_ANDROID was added only to match the rule for cherry-picking the workaround to M30 (see the bug for details). I forgot to un-conditionalize this in trunk. I believe users are unaffected on Release builds: an error from Sparse IO will lead to network failover by other means than the workaround. For debug builds Sparse IO can DCHECK on Windows when hitting Sparse IO with Simple Cache enabled, this change will fix it, but the impact is very small. BUG=263642 Review URL: https://codereview.chromium.org/50753002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231661 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/http_cache_transaction.cc8
-rw-r--r--net/http/http_cache_unittest.cc4
2 files changed, 0 insertions, 12 deletions
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index be123af..7af72c8 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -1518,20 +1518,12 @@ 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;
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 6e1adf7..03c9934 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -3455,8 +3455,6 @@ TEST(HttpCache, RangeGET_OK) {
RemoveMockTransaction(&kRangeGET_TransactionOK);
}
-#if defined(OS_ANDROID)
-
// Checks that with a cache backend having Sparse IO unimplementes the cache
// entry would be doomed after a range request.
// TODO(pasko): remove when the SimpleBackendImpl implements Sparse IO.
@@ -3529,8 +3527,6 @@ TEST(HttpCache, RangeGET_SparseNotImplementedOnEmptyCache) {
RemoveMockTransaction(&transaction);
}
-#endif // OS_ANDROID
-
// Tests that we can cache range requests and fetch random blocks from the
// cache and the network, with synchronous responses.
TEST(HttpCache, RangeGET_SyncOK) {