| 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" // For OS_POSIX | 7 #include "build/build_config.h" // For OS_POSIX |
| 8 | 8 |
| 9 #if defined(OS_POSIX) | 9 #if defined(OS_POSIX) |
| 10 #include <unistd.h> | 10 #include <unistd.h> |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 // This time doesn't make much sense when reading from the cache, so just use | 597 // This time doesn't make much sense when reading from the cache, so just use |
| 598 // the same time as send_start. | 598 // the same time as send_start. |
| 599 load_timing_info->send_end = first_cache_access_since_; | 599 load_timing_info->send_end = first_cache_access_since_; |
| 600 return true; | 600 return true; |
| 601 } | 601 } |
| 602 | 602 |
| 603 bool HttpCache::Transaction::GetRemoteEndpoint(IPEndPoint* endpoint) const { | 603 bool HttpCache::Transaction::GetRemoteEndpoint(IPEndPoint* endpoint) const { |
| 604 if (network_trans_) | 604 if (network_trans_) |
| 605 return network_trans_->GetRemoteEndpoint(endpoint); | 605 return network_trans_->GetRemoteEndpoint(endpoint); |
| 606 | 606 |
| 607 if (!old_remote_endpoint_.address().empty()) { | 607 if (!old_remote_endpoint_.address_number().empty()) { |
| 608 *endpoint = old_remote_endpoint_; | 608 *endpoint = old_remote_endpoint_; |
| 609 return true; | 609 return true; |
| 610 } | 610 } |
| 611 | 611 |
| 612 return false; | 612 return false; |
| 613 } | 613 } |
| 614 | 614 |
| 615 void HttpCache::Transaction::PopulateNetErrorDetails( | 615 void HttpCache::Transaction::PopulateNetErrorDetails( |
| 616 NetErrorDetails* details) const { | 616 NetErrorDetails* details) const { |
| 617 if (network_trans_) | 617 if (network_trans_) |
| (...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2945 default: | 2945 default: |
| 2946 NOTREACHED(); | 2946 NOTREACHED(); |
| 2947 } | 2947 } |
| 2948 } | 2948 } |
| 2949 | 2949 |
| 2950 void HttpCache::Transaction::OnIOComplete(int result) { | 2950 void HttpCache::Transaction::OnIOComplete(int result) { |
| 2951 DoLoop(result); | 2951 DoLoop(result); |
| 2952 } | 2952 } |
| 2953 | 2953 |
| 2954 } // namespace net | 2954 } // namespace net |
| OLD | NEW |