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

Unified Diff: content/browser/renderer_host/async_resource_handler.cc

Issue 8680036: Move ResourceResponse struct into the Content API, since it's used in Chrome. While at it, I also... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: add gypi changes Created 9 years, 1 month 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
Index: content/browser/renderer_host/async_resource_handler.cc
===================================================================
--- content/browser/renderer_host/async_resource_handler.cc (revision 111374)
+++ content/browser/renderer_host/async_resource_handler.cc (working copy)
@@ -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 @@
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 @@
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 @@
}
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(),
« no previous file with comments | « content/browser/renderer_host/async_resource_handler.h ('k') | content/browser/renderer_host/buffered_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698