| 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 "chrome/renderer/security_filter_peer.h" | 5 #include "chrome/renderer/security_filter_peer.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 original_peer_->OnReceivedResponse(response_info_); | 142 original_peer_->OnReceivedResponse(response_info_); |
| 143 original_peer_->OnCompletedRequest(net::ERR_ABORTED, false, | 143 original_peer_->OnCompletedRequest(net::ERR_ABORTED, false, |
| 144 stale_copy_in_cache, security_info, | 144 stale_copy_in_cache, security_info, |
| 145 completion_time, total_transfer_size); | 145 completion_time, total_transfer_size); |
| 146 return; | 146 return; |
| 147 } | 147 } |
| 148 | 148 |
| 149 original_peer_->OnReceivedResponse(response_info_); | 149 original_peer_->OnReceivedResponse(response_info_); |
| 150 if (!data_.empty()) { | 150 if (!data_.empty()) { |
| 151 original_peer_->OnReceivedData(base::WrapUnique( | 151 original_peer_->OnReceivedData(base::WrapUnique( |
| 152 new content::FixedReceivedData(data_.data(), data_.size(), -1))); | 152 new content::FixedReceivedData(data_.data(), data_.size(), -1, 0))); |
| 153 } | 153 } |
| 154 original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler, | 154 original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler, |
| 155 stale_copy_in_cache, security_info, | 155 stale_copy_in_cache, security_info, |
| 156 completion_time, total_transfer_size); | 156 completion_time, total_transfer_size); |
| 157 } | 157 } |
| 158 | 158 |
| 159 //////////////////////////////////////////////////////////////////////////////// | 159 //////////////////////////////////////////////////////////////////////////////// |
| 160 // ReplaceContentPeer | 160 // ReplaceContentPeer |
| 161 | 161 |
| 162 ReplaceContentPeer::ReplaceContentPeer( | 162 ReplaceContentPeer::ReplaceContentPeer( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 184 const std::string& security_info, | 184 const std::string& security_info, |
| 185 const base::TimeTicks& completion_time, | 185 const base::TimeTicks& completion_time, |
| 186 int64_t total_transfer_size) { | 186 int64_t total_transfer_size) { |
| 187 content::ResourceResponseInfo info; | 187 content::ResourceResponseInfo info; |
| 188 ProcessResponseInfo(info, &info, mime_type_); | 188 ProcessResponseInfo(info, &info, mime_type_); |
| 189 info.security_info = security_info; | 189 info.security_info = security_info; |
| 190 info.content_length = static_cast<int>(data_.size()); | 190 info.content_length = static_cast<int>(data_.size()); |
| 191 original_peer_->OnReceivedResponse(info); | 191 original_peer_->OnReceivedResponse(info); |
| 192 if (!data_.empty()) { | 192 if (!data_.empty()) { |
| 193 original_peer_->OnReceivedData(base::WrapUnique( | 193 original_peer_->OnReceivedData(base::WrapUnique( |
| 194 new content::FixedReceivedData(data_.data(), data_.size(), -1))); | 194 new content::FixedReceivedData(data_.data(), data_.size(), -1, 0))); |
| 195 } | 195 } |
| 196 original_peer_->OnCompletedRequest(net::OK, false, stale_copy_in_cache, | 196 original_peer_->OnCompletedRequest(net::OK, false, stale_copy_in_cache, |
| 197 security_info, completion_time, | 197 security_info, completion_time, |
| 198 total_transfer_size); | 198 total_transfer_size); |
| 199 } | 199 } |
| OLD | NEW |