| 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 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 return ERR_UNEXPECTED; | 1412 return ERR_UNEXPECTED; |
| 1413 | 1413 |
| 1414 return ValidateEntryHeadersAndContinue(); | 1414 return ValidateEntryHeadersAndContinue(); |
| 1415 } | 1415 } |
| 1416 | 1416 |
| 1417 int HttpCache::Transaction::DoCacheReadData() { | 1417 int HttpCache::Transaction::DoCacheReadData() { |
| 1418 DCHECK(entry_); | 1418 DCHECK(entry_); |
| 1419 next_state_ = STATE_CACHE_READ_DATA_COMPLETE; | 1419 next_state_ = STATE_CACHE_READ_DATA_COMPLETE; |
| 1420 | 1420 |
| 1421 if (infinite_cache_transaction_.get()) | 1421 if (infinite_cache_transaction_.get()) |
| 1422 infinite_cache_transaction_->OnServedFromCache(); | 1422 infinite_cache_transaction_->OnServedFromCache(&response_); |
| 1423 | 1423 |
| 1424 if (net_log_.IsLoggingAllEvents()) | 1424 if (net_log_.IsLoggingAllEvents()) |
| 1425 net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_READ_DATA); | 1425 net_log_.BeginEvent(NetLog::TYPE_HTTP_CACHE_READ_DATA); |
| 1426 ReportCacheActionStart(); | 1426 ReportCacheActionStart(); |
| 1427 if (partial_.get()) { | 1427 if (partial_.get()) { |
| 1428 return partial_->CacheRead(entry_->disk_entry, read_buf_, io_buf_len_, | 1428 return partial_->CacheRead(entry_->disk_entry, read_buf_, io_buf_len_, |
| 1429 io_callback_); | 1429 io_callback_); |
| 1430 } | 1430 } |
| 1431 | 1431 |
| 1432 return entry_->disk_entry->ReadData(kResponseContentIndex, read_offset_, | 1432 return entry_->disk_entry->ReadData(kResponseContentIndex, read_offset_, |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2404 before_send_percent); | 2404 before_send_percent); |
| 2405 } | 2405 } |
| 2406 break; | 2406 break; |
| 2407 } | 2407 } |
| 2408 default: | 2408 default: |
| 2409 NOTREACHED(); | 2409 NOTREACHED(); |
| 2410 } | 2410 } |
| 2411 } | 2411 } |
| 2412 | 2412 |
| 2413 } // namespace net | 2413 } // namespace net |
| OLD | NEW |