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

Unified Diff: content/child/resource_dispatcher.cc

Issue 23842002: Whitelisting exts and plugins from cross-site document blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Comments & Coding style are improved. Created 7 years, 3 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/site_isolation_policy.h » ('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 31e6f6a9d9731ebda63f61e955f1ee0ac971f160..59bafdf3c48747cd55c5f0692d47900c1d873d46 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -183,8 +183,11 @@ bool IPCResourceLoaderBridge::Start(Peer* peer) {
peer_ = peer;
// generate the request ID, and append it to the message
- request_id_ = dispatcher_->AddPendingRequest(
- peer_, request_.resource_type, frame_origin_, request_.url);
+ request_id_ = dispatcher_->AddPendingRequest(peer_,
+ request_.resource_type,
+ request_.origin_pid,
+ frame_origin_,
+ request_.url);
return dispatcher_->message_sender()->Send(
new ResourceHostMsg_RequestResource(routing_id_, request_id_, request_));
@@ -355,6 +358,7 @@ void ResourceDispatcher::OnReceivedResponse(
request_info->frame_origin,
request_info->response_url,
request_info->resource_type,
+ request_info->origin_pid,
renderer_response_info);
request_info->peer->OnReceivedResponse(renderer_response_info);
}
@@ -546,12 +550,13 @@ void ResourceDispatcher::OnRequestComplete(
int ResourceDispatcher::AddPendingRequest(
ResourceLoaderBridge::Peer* callback,
ResourceType::Type resource_type,
+ int origin_pid,
const GURL& frame_origin,
const GURL& request_url) {
// Compute a unique request_id for this renderer process.
int id = MakeRequestID();
- pending_requests_[id] =
- PendingRequestInfo(callback, resource_type, frame_origin, request_url);
+ pending_requests_[id] = PendingRequestInfo(
+ callback, resource_type, origin_pid, frame_origin, request_url);
return id;
}
@@ -624,10 +629,12 @@ ResourceDispatcher::PendingRequestInfo::PendingRequestInfo()
ResourceDispatcher::PendingRequestInfo::PendingRequestInfo(
webkit_glue::ResourceLoaderBridge::Peer* peer,
ResourceType::Type resource_type,
+ int origin_pid,
const GURL& frame_origin,
const GURL& request_url)
: peer(peer),
resource_type(resource_type),
+ origin_pid(origin_pid),
is_deferred(false),
url(request_url),
frame_origin(frame_origin),
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/site_isolation_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698