| 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 range_requested_ = (partial_.get() != NULL); | 718 range_requested_ = (partial_.get() != NULL); |
| 719 | 719 |
| 720 return OK; | 720 return OK; |
| 721 } | 721 } |
| 722 | 722 |
| 723 int HttpCache::Transaction::DoSendRequest() { | 723 int HttpCache::Transaction::DoSendRequest() { |
| 724 DCHECK(mode_ & WRITE || mode_ == NONE); | 724 DCHECK(mode_ & WRITE || mode_ == NONE); |
| 725 DCHECK(!network_trans_.get()); | 725 DCHECK(!network_trans_.get()); |
| 726 | 726 |
| 727 // Create a network transaction. | 727 // Create a network transaction. |
| 728 int rv = cache_->network_layer_->CreateTransaction(&network_trans_, NULL); | 728 int rv = cache_->network_layer_->CreateTransaction(&network_trans_, |
| 729 transaction_delegate_); |
| 729 if (rv != OK) | 730 if (rv != OK) |
| 730 return rv; | 731 return rv; |
| 731 | 732 |
| 732 next_state_ = STATE_SEND_REQUEST_COMPLETE; | 733 next_state_ = STATE_SEND_REQUEST_COMPLETE; |
| 733 rv = network_trans_->Start(request_, io_callback_, net_log_); | 734 rv = network_trans_->Start(request_, io_callback_, net_log_); |
| 734 return rv; | 735 return rv; |
| 735 } | 736 } |
| 736 | 737 |
| 737 int HttpCache::Transaction::DoSendRequestComplete(int result) { | 738 int HttpCache::Transaction::DoSendRequestComplete(int result) { |
| 738 if (!cache_) | 739 if (!cache_) |
| (...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2179 if (transaction_delegate_) | 2180 if (transaction_delegate_) |
| 2180 transaction_delegate_->OnCacheActionStart(); | 2181 transaction_delegate_->OnCacheActionStart(); |
| 2181 } | 2182 } |
| 2182 | 2183 |
| 2183 void HttpCache::Transaction::ReportCacheActionFinish() { | 2184 void HttpCache::Transaction::ReportCacheActionFinish() { |
| 2184 if (transaction_delegate_) | 2185 if (transaction_delegate_) |
| 2185 transaction_delegate_->OnCacheActionFinish(); | 2186 transaction_delegate_->OnCacheActionFinish(); |
| 2186 } | 2187 } |
| 2187 | 2188 |
| 2188 } // namespace net | 2189 } // namespace net |
| OLD | NEW |