Chromium Code Reviews| Index: content/child/url_response_body_consumer.cc |
| diff --git a/content/child/url_response_body_consumer.cc b/content/child/url_response_body_consumer.cc |
| index 1e6859cc784b8571d1513a9d7e2d07be4a76e8c1..9e838796628a4b63a29c4a97891758a60b1278be 100644 |
| --- a/content/child/url_response_body_consumer.cc |
| +++ b/content/child/url_response_body_consumer.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/ptr_util.h" |
| #include "content/child/resource_dispatcher.h" |
| +#include "content/child/site_isolation_stats_gatherer.h" |
| #include "content/common/resource_messages.h" |
| #include "content/common/resource_request_completion_status.h" |
| #include "content/public/child/request_peer.h" |
| @@ -143,6 +144,16 @@ void URLResponseBodyConsumer::OnReadable(MojoResult unused) { |
| ResourceDispatcher::PendingRequestInfo* request_info = |
| resource_dispatcher_->GetPendingRequestInfo(request_id_); |
| DCHECK(request_info); |
| + |
| + // Check whether this response data is compliant with our cross-site |
|
yhirano
2017/01/19 10:35:55
This code is copied from ResourceDispatcher::OnRec
|
| + // 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, |
| + static_cast<const char*>(buffer), available); |
| + request_info->site_isolation_metadata.reset(); |
| + } |
| + |
| request_info->peer->OnReceivedData(base::MakeUnique<ReceivedData>( |
| static_cast<const char*>(buffer), available, this)); |
| } |