Commit 25ea98ba authored by tfarina@chromium.org's avatar tfarina@chromium.org

No need to have RequestPeer as a data member variable of IPCResourceLoaderBridge.

It seems we can just pass |peer| directly to AddPendingRequest()
function and thus remove this variable, simplifying
IPCResourceLoaderBridge.

BUG=265753, 338338, 237249
TEST=content_shell + content_unittests
R=jam@chromium.org

Review URL: https://codereview.chromium.org/294043012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272787 0039d316-1c4b-4281-b951-d872f2087c98
parent 438b99bc
...@@ -84,8 +84,6 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge { ...@@ -84,8 +84,6 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge {
virtual void SyncLoad(SyncLoadResponse* response) OVERRIDE; virtual void SyncLoad(SyncLoadResponse* response) OVERRIDE;
private: private:
RequestPeer* peer_;
// The resource dispatcher for this loader. The bridge doesn't own it, but // The resource dispatcher for this loader. The bridge doesn't own it, but
// it's guaranteed to outlive the bridge. // it's guaranteed to outlive the bridge.
ResourceDispatcher* dispatcher_; ResourceDispatcher* dispatcher_;
...@@ -109,8 +107,7 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge { ...@@ -109,8 +107,7 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge {
IPCResourceLoaderBridge::IPCResourceLoaderBridge( IPCResourceLoaderBridge::IPCResourceLoaderBridge(
ResourceDispatcher* dispatcher, ResourceDispatcher* dispatcher,
const RequestInfo& request_info) const RequestInfo& request_info)
: peer_(NULL), : dispatcher_(dispatcher),
dispatcher_(dispatcher),
request_id_(-1), request_id_(-1),
routing_id_(request_info.routing_id), routing_id_(request_info.routing_id),
is_synchronous_request_(false) { is_synchronous_request_(false) {
...@@ -177,10 +174,8 @@ bool IPCResourceLoaderBridge::Start(RequestPeer* peer) { ...@@ -177,10 +174,8 @@ bool IPCResourceLoaderBridge::Start(RequestPeer* peer) {
return false; return false;
} }
peer_ = peer;
// generate the request ID, and append it to the message // generate the request ID, and append it to the message
request_id_ = dispatcher_->AddPendingRequest(peer_, request_id_ = dispatcher_->AddPendingRequest(peer,
request_.resource_type, request_.resource_type,
request_.origin_pid, request_.origin_pid,
frame_origin_, frame_origin_,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment