OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/http/http_cache_transaction.h" | 5 #include "net/http/http_cache_transaction.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1523 | 1523 |
1524 int HttpCache::Transaction::DoCacheQueryData() { | 1524 int HttpCache::Transaction::DoCacheQueryData() { |
1525 next_state_ = STATE_CACHE_QUERY_DATA_COMPLETE; | 1525 next_state_ = STATE_CACHE_QUERY_DATA_COMPLETE; |
1526 | 1526 |
1527 // Balanced in DoCacheQueryDataComplete. | 1527 // Balanced in DoCacheQueryDataComplete. |
1528 return ResetCacheIOStart( | 1528 return ResetCacheIOStart( |
1529 entry_->disk_entry->ReadyForSparseIO(io_callback_)); | 1529 entry_->disk_entry->ReadyForSparseIO(io_callback_)); |
1530 } | 1530 } |
1531 | 1531 |
1532 int HttpCache::Transaction::DoCacheQueryDataComplete(int result) { | 1532 int HttpCache::Transaction::DoCacheQueryDataComplete(int result) { |
1533 if (result == ERR_NOT_IMPLEMENTED) { | |
1534 // Send the network request if the backend does not support caching ranges. | |
gavinp
2013/08/26 15:46:37
Should we add a TODO here for after the simple cac
pasko
2013/08/27 17:22:13
Done.
| |
1535 next_state_ = STATE_SEND_REQUEST; | |
rvargas (doing something else)
2013/08/26 21:24:52
This is most likely not enough. It basically means
pasko
2013/08/27 17:22:13
Thanks!
Doing DoRestartPartialRequest() is indeed
| |
1536 return OK; | |
1537 } | |
1533 DCHECK_EQ(OK, result); | 1538 DCHECK_EQ(OK, result); |
1534 if (!cache_.get()) | 1539 if (!cache_.get()) |
1535 return ERR_UNEXPECTED; | 1540 return ERR_UNEXPECTED; |
1536 | 1541 |
1537 return ValidateEntryHeadersAndContinue(); | 1542 return ValidateEntryHeadersAndContinue(); |
1538 } | 1543 } |
1539 | 1544 |
1540 int HttpCache::Transaction::DoCacheReadData() { | 1545 int HttpCache::Transaction::DoCacheReadData() { |
1541 DCHECK(entry_); | 1546 DCHECK(entry_); |
1542 next_state_ = STATE_CACHE_READ_DATA_COMPLETE; | 1547 next_state_ = STATE_CACHE_READ_DATA_COMPLETE; |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2595 void HttpCache::Transaction::ResetNetworkTransaction() { | 2600 void HttpCache::Transaction::ResetNetworkTransaction() { |
2596 DCHECK(!old_network_trans_load_timing_); | 2601 DCHECK(!old_network_trans_load_timing_); |
2597 DCHECK(network_trans_); | 2602 DCHECK(network_trans_); |
2598 LoadTimingInfo load_timing; | 2603 LoadTimingInfo load_timing; |
2599 if (network_trans_->GetLoadTimingInfo(&load_timing)) | 2604 if (network_trans_->GetLoadTimingInfo(&load_timing)) |
2600 old_network_trans_load_timing_.reset(new LoadTimingInfo(load_timing)); | 2605 old_network_trans_load_timing_.reset(new LoadTimingInfo(load_timing)); |
2601 network_trans_.reset(); | 2606 network_trans_.reset(); |
2602 } | 2607 } |
2603 | 2608 |
2604 } // namespace net | 2609 } // namespace net |
OLD | NEW |