Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5777)

Unified Diff: chrome/renderer/security_filter_peer.cc

Issue 2572513004: Remove unused class BufferedPeer (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/security_filter_peer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « chrome/renderer/security_filter_peer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698