OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.h" | 5 #include "net/http/http_cache.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 | 10 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 DCHECK(buf->data()); | 156 DCHECK(buf->data()); |
157 request_info_.url = url; | 157 request_info_.url = url; |
158 request_info_.method = "GET"; | 158 request_info_.method = "GET"; |
159 request_info_.load_flags = LOAD_ONLY_FROM_CACHE; | 159 request_info_.load_flags = LOAD_ONLY_FROM_CACHE; |
160 | 160 |
161 expected_response_time_ = expected_response_time; | 161 expected_response_time_ = expected_response_time; |
162 buf_ = buf; | 162 buf_ = buf; |
163 buf_len_ = buf_len; | 163 buf_len_ = buf_len; |
164 verified_ = false; | 164 verified_ = false; |
165 | 165 |
166 int rv = transaction_->Start(&request_info_, &callback_, NULL); | 166 int rv = transaction_->Start(&request_info_, &callback_, BoundNetLog()); |
167 if (rv != ERR_IO_PENDING) | 167 if (rv != ERR_IO_PENDING) |
168 VerifyResponse(rv); | 168 VerifyResponse(rv); |
169 } | 169 } |
170 | 170 |
171 void HttpCache::MetadataWriter::VerifyResponse(int result) { | 171 void HttpCache::MetadataWriter::VerifyResponse(int result) { |
172 verified_ = true; | 172 verified_ = true; |
173 if (result != OK) | 173 if (result != OK) |
174 return SelfDestroy(); | 174 return SelfDestroy(); |
175 | 175 |
176 const HttpResponseInfo* response_info = transaction_->GetResponseInfo(); | 176 const HttpResponseInfo* response_info = transaction_->GetResponseInfo(); |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 item->NotifyTransaction(ERR_CACHE_RACE, NULL); | 902 item->NotifyTransaction(ERR_CACHE_RACE, NULL); |
903 fail_requests = true; | 903 fail_requests = true; |
904 } else { | 904 } else { |
905 item->NotifyTransaction(result, entry); | 905 item->NotifyTransaction(result, entry); |
906 } | 906 } |
907 } | 907 } |
908 } | 908 } |
909 } | 909 } |
910 | 910 |
911 } // namespace net | 911 } // namespace net |
OLD | NEW |