| Index: chrome/renderer/security_filter_peer.cc
|
| diff --git a/chrome/renderer/security_filter_peer.cc b/chrome/renderer/security_filter_peer.cc
|
| index 4887b0c41746fbc1d83c428b80c6daf48084e3af..c9b78516b3167bf05e4586e77e09335dcc4067ad 100644
|
| --- a/chrome/renderer/security_filter_peer.cc
|
| +++ b/chrome/renderer/security_filter_peer.cc
|
| @@ -116,51 +116,6 @@ void ProcessResponseInfo(const content::ResourceResponseInfo& info_in,
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| -// BufferedPeer
|
| -
|
| -BufferedPeer::BufferedPeer(std::unique_ptr<content::RequestPeer> peer,
|
| - const std::string& mime_type)
|
| - : SecurityFilterPeer(std::move(peer)), mime_type_(mime_type) {}
|
| -
|
| -BufferedPeer::~BufferedPeer() {
|
| -}
|
| -
|
| -void BufferedPeer::OnReceivedResponse(
|
| - const content::ResourceResponseInfo& info) {
|
| - ProcessResponseInfo(info, &response_info_, mime_type_);
|
| -}
|
| -
|
| -void BufferedPeer::OnReceivedData(std::unique_ptr<ReceivedData> data) {
|
| - data_.append(data->payload(), data->length());
|
| -}
|
| -
|
| -void BufferedPeer::OnCompletedRequest(int error_code,
|
| - bool was_ignored_by_handler,
|
| - bool stale_copy_in_cache,
|
| - const base::TimeTicks& completion_time,
|
| - int64_t total_transfer_size,
|
| - int64_t encoded_body_size) {
|
| - // Give sub-classes a chance at altering the data.
|
| - if (error_code != net::OK || !DataReady()) {
|
| - // Pretend we failed to load the resource.
|
| - original_peer_->OnReceivedResponse(response_info_);
|
| - original_peer_->OnCompletedRequest(net::ERR_ABORTED, false,
|
| - stale_copy_in_cache, completion_time,
|
| - total_transfer_size, encoded_body_size);
|
| - return;
|
| - }
|
| -
|
| - original_peer_->OnReceivedResponse(response_info_);
|
| - if (!data_.empty()) {
|
| - original_peer_->OnReceivedData(base::MakeUnique<content::FixedReceivedData>(
|
| - data_.data(), data_.size()));
|
| - }
|
| - original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler,
|
| - stale_copy_in_cache, completion_time,
|
| - total_transfer_size, encoded_body_size);
|
| -}
|
| -
|
| -////////////////////////////////////////////////////////////////////////////////
|
| // ReplaceContentPeer
|
|
|
| ReplaceContentPeer::ReplaceContentPeer(
|
|
|