diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-24 01:23:34 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-24 01:23:34 +0000 |
commit | 2336ffec2176cdd2aa3c98ee4a3f1ce1e84fc408 (patch) | |
tree | dc735317f1d63ab8fe44b0b01fd6e46b63c770fe /content/browser/renderer_host/async_resource_handler.cc | |
parent | 4bbc81d76526eb451eb9fbeb82cd99d245f324e2 (diff) | |
download | chromium_src-2336ffec2176cdd2aa3c98ee4a3f1ce1e84fc408.zip chromium_src-2336ffec2176cdd2aa3c98ee4a3f1ce1e84fc408.tar.gz chromium_src-2336ffec2176cdd2aa3c98ee4a3f1ce1e84fc408.tar.bz2 |
Move ResourceResponse struct into the Content API, since it's used in Chrome. While at it, I also made the ResourceResponse wrapper just derive from ResourceResponseHead, so that the parameters are accessed directly, instead of having to go through a member variable.
BUG=98716
Review URL: http://codereview.chromium.org/8680036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/async_resource_handler.cc')
-rw-r--r-- | content/browser/renderer_host/async_resource_handler.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/content/browser/renderer_host/async_resource_handler.cc b/content/browser/renderer_host/async_resource_handler.cc index 235a569..9f7577f 100644 --- a/content/browser/renderer_host/async_resource_handler.cc +++ b/content/browser/renderer_host/async_resource_handler.cc @@ -17,10 +17,10 @@ #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" #include "content/browser/renderer_host/resource_message_filter.h" #include "content/browser/resource_context.h" -#include "content/common/resource_response.h" #include "content/common/resource_messages.h" #include "content/common/view_messages.h" #include "content/public/browser/resource_dispatcher_host_delegate.h" +#include "content/public/common/resource_response.h" #include "net/base/io_buffer.h" #include "net/base/load_flags.h" #include "net/base/net_log.h" @@ -98,10 +98,11 @@ bool AsyncResourceHandler::OnUploadProgress(int request_id, position, size)); } -bool AsyncResourceHandler::OnRequestRedirected(int request_id, - const GURL& new_url, - ResourceResponse* response, - bool* defer) { +bool AsyncResourceHandler::OnRequestRedirected( + int request_id, + const GURL& new_url, + content::ResourceResponse* response, + bool* defer) { *defer = true; net::URLRequest* request = rdh_->GetURLRequest( GlobalRequestID(filter_->child_id(), request_id)); @@ -110,11 +111,12 @@ bool AsyncResourceHandler::OnRequestRedirected(int request_id, DevToolsNetLogObserver::PopulateResponseInfo(request, response); return filter_->Send(new ResourceMsg_ReceivedRedirect( - routing_id_, request_id, new_url, response->response_head)); + routing_id_, request_id, new_url, *response)); } -bool AsyncResourceHandler::OnResponseStarted(int request_id, - ResourceResponse* response) { +bool AsyncResourceHandler::OnResponseStarted( + int request_id, + content::ResourceResponse* response) { // For changes to the main frame, inform the renderer of the new URL's // per-host settings before the request actually commits. This way the // renderer will be able to set these precisely at the time the @@ -142,7 +144,7 @@ bool AsyncResourceHandler::OnResponseStarted(int request_id, } filter_->Send(new ResourceMsg_ReceivedResponse( - routing_id_, request_id, response->response_head)); + routing_id_, request_id, *response)); if (request->response_info().metadata) { std::vector<char> copy(request->response_info().metadata->data(), |