diff options
author | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 09:18:06 +0000 |
---|---|---|
committer | abarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 09:18:06 +0000 |
commit | c46b0e667387bb42a18be86e8b1f85e968902953 (patch) | |
tree | 801ddb204b400e25ecd3fe1211584e5b5519e93e /chrome/common/resource_dispatcher.cc | |
parent | ffc45869f044885b81265e6a67cb0220758113b5 (diff) | |
download | chromium_src-c46b0e667387bb42a18be86e8b1f85e968902953.zip chromium_src-c46b0e667387bb42a18be86e8b1f85e968902953.tar.gz chromium_src-c46b0e667387bb42a18be86e8b1f85e968902953.tar.bz2 |
SSLPolicy Fix: Step 3.
Plumbing the security origin of the frame making the request to SSL land.
R=wtc
BUG=8706
Review URL: http://codereview.chromium.org/48038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11851 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/resource_dispatcher.cc')
-rw-r--r-- | chrome/common/resource_dispatcher.cc | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc index f29fa24..e5c398b 100644 --- a/chrome/common/resource_dispatcher.cc +++ b/chrome/common/resource_dispatcher.cc @@ -47,11 +47,12 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge { const GURL& url, const GURL& policy_url, const GURL& referrer, + const std::string& frame_origin, + const std::string& main_frame_origin, const std::string& headers, int load_flags, int origin_pid, ResourceType::Type resource_type, - bool mixed_content, uint32 request_context, int route_id); virtual ~IPCResourceLoaderBridge(); @@ -98,11 +99,12 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge( const GURL& url, const GURL& policy_url, const GURL& referrer, + const std::string& frame_origin, + const std::string& main_frame_origin, const std::string& headers, int load_flags, int origin_pid, ResourceType::Type resource_type, - bool mixed_content, uint32 request_context, int route_id) : peer_(NULL), @@ -114,11 +116,12 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge( request_.url = url; request_.policy_url = policy_url; request_.referrer = referrer; + request_.frame_origin = frame_origin; + request_.main_frame_origin = main_frame_origin; request_.headers = headers; request_.load_flags = load_flags; request_.origin_pid = origin_pid; request_.resource_type = resource_type; - request_.mixed_content = mixed_content; request_.request_context = request_context; #ifdef LOG_RESOURCE_REQUESTS @@ -168,8 +171,7 @@ 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, - request_.mixed_content); + request_id_ = dispatcher_->AddPendingRequest(peer_, request_.resource_type); return dispatcher_->message_sender()->Send( new ViewHostMsg_RequestResource(route_id_, request_id_, request_)); @@ -439,12 +441,10 @@ void ResourceDispatcher::OnRequestComplete(int request_id, int ResourceDispatcher::AddPendingRequest( webkit_glue::ResourceLoaderBridge::Peer* callback, - ResourceType::Type resource_type, - bool mixed_content) { + ResourceType::Type resource_type) { // Compute a unique request_id for this renderer process. int id = MakeRequestID(); - pending_requests_[id] = PendingRequestInfo(callback, resource_type, - mixed_content); + pending_requests_[id] = PendingRequestInfo(callback, resource_type); return id; } @@ -508,19 +508,20 @@ webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge( const GURL& url, const GURL& policy_url, const GURL& referrer, + const std::string& frame_origin, + const std::string& main_frame_origin, const std::string& headers, int flags, int origin_pid, ResourceType::Type resource_type, - bool mixed_content, uint32 request_context, int route_id) { return new webkit_glue::IPCResourceLoaderBridge(this, method, url, policy_url, - referrer, headers, flags, - origin_pid, resource_type, - mixed_content, - request_context, - route_id); + referrer, frame_origin, + main_frame_origin, headers, + flags, origin_pid, + resource_type, + request_context, route_id); } bool ResourceDispatcher::IsResourceDispatcherMessage( |