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

Unified Diff: content/child/resource_dispatcher.cc

Issue 2762953004: Remove inline small resource transfer experiment (Closed)
Patch Set: Created 3 years, 9 months 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 | « content/child/resource_dispatcher.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 2fafeb75e1b3a297fe5b2b1723af4541d5ea30af..46c4968d6b8ae75c365af546b211abf2a136f244 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -13,7 +13,6 @@
#include "base/debug/alias.h"
#include "base/debug/dump_without_crashing.h"
#include "base/debug/stack_trace.h"
-#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/memory/ptr_util.h"
#include "base/memory/shared_memory.h"
@@ -36,7 +35,6 @@
#include "content/public/child/fixed_received_data.h"
#include "content/public/child/request_peer.h"
#include "content/public/child/resource_dispatcher_delegate.h"
-#include "content/public/common/content_features.h"
#include "content/public/common/resource_response.h"
#include "content/public/common/resource_type.h"
#include "net/base/net_errors.h"
@@ -237,38 +235,6 @@ void ResourceDispatcher::OnSetDataBuffer(int request_id,
request_info->buffer_size = shm_size;
}
-void ResourceDispatcher::OnReceivedInlinedDataChunk(
- int request_id,
- const std::vector<char>& data,
- int encoded_data_length) {
- TRACE_EVENT0("loader", "ResourceDispatcher::OnReceivedInlinedDataChunk");
- DCHECK(!data.empty());
- DCHECK(base::FeatureList::IsEnabled(
- features::kOptimizeLoadingIPCForSmallResources));
-
- PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
- if (!request_info || data.empty())
- return;
-
- // Check whether this response data is compliant with our cross-site
- // document blocking policy. We only do this for the first chunk of data.
- if (request_info->site_isolation_metadata.get()) {
- SiteIsolationStatsGatherer::OnReceivedFirstChunk(
- request_info->site_isolation_metadata, data.data(), data.size());
- request_info->site_isolation_metadata.reset();
- }
-
- DCHECK(!request_info->buffer.get());
-
- request_info->peer->OnReceivedData(
- base::MakeUnique<content::FixedReceivedData>(data));
-
- // Get the request info again as the client callback may modify the info.
- request_info = GetPendingRequestInfo(request_id);
- if (request_info && encoded_data_length > 0)
- request_info->peer->OnTransferSizeUpdated(encoded_data_length);
-}
-
void ResourceDispatcher::OnReceivedData(int request_id,
int data_offset,
int data_length,
@@ -559,8 +525,6 @@ void ResourceDispatcher::DispatchMessage(const IPC::Message& message) {
OnReceivedCachedMetadata)
IPC_MESSAGE_HANDLER(ResourceMsg_ReceivedRedirect, OnReceivedRedirect)
IPC_MESSAGE_HANDLER(ResourceMsg_SetDataBuffer, OnSetDataBuffer)
- IPC_MESSAGE_HANDLER(ResourceMsg_InlinedDataChunkReceived,
- OnReceivedInlinedDataChunk)
IPC_MESSAGE_HANDLER(ResourceMsg_DataReceived, OnReceivedData)
IPC_MESSAGE_HANDLER(ResourceMsg_DataDownloaded, OnDownloadedData)
IPC_MESSAGE_HANDLER(ResourceMsg_RequestComplete, OnRequestComplete)
@@ -780,7 +744,6 @@ bool ResourceDispatcher::IsResourceDispatcherMessage(
case ResourceMsg_ReceivedCachedMetadata::ID:
case ResourceMsg_ReceivedRedirect::ID:
case ResourceMsg_SetDataBuffer::ID:
- case ResourceMsg_InlinedDataChunkReceived::ID:
case ResourceMsg_DataReceived::ID:
case ResourceMsg_DataDownloaded::ID:
case ResourceMsg_RequestComplete::ID:
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698