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

Unified Diff: content/browser/renderer_host/cross_site_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/cross_site_resource_handler.cc
===================================================================
--- content/browser/renderer_host/cross_site_resource_handler.cc (revision 111374)
+++ content/browser/renderer_host/cross_site_resource_handler.cc (working copy)
@@ -13,7 +13,7 @@
#include "content/browser/renderer_host/render_view_host_notification_task.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
-#include "content/common/resource_response.h"
+#include "content/public/common/resource_response.h"
#include "net/base/io_buffer.h"
#include "net/http/http_response_headers.h"
@@ -39,18 +39,20 @@
return next_handler_->OnUploadProgress(request_id, position, size);
}
-bool CrossSiteResourceHandler::OnRequestRedirected(int request_id,
- const GURL& new_url,
- ResourceResponse* response,
- bool* defer) {
+bool CrossSiteResourceHandler::OnRequestRedirected(
+ int request_id,
+ const GURL& new_url,
+ content::ResourceResponse* response,
+ bool* defer) {
// We should not have started the transition before being redirected.
DCHECK(!in_cross_site_transition_);
return next_handler_->OnRequestRedirected(
request_id, new_url, response, defer);
}
-bool CrossSiteResourceHandler::OnResponseStarted(int request_id,
- ResourceResponse* response) {
+bool CrossSiteResourceHandler::OnResponseStarted(
+ int request_id,
+ content::ResourceResponse* response) {
// At this point, we know that the response is safe to send back to the
// renderer: it is not a download, and it has passed the SSL and safe
// browsing checks.
@@ -80,8 +82,7 @@
// cross-site navigation, since we are unable to tell when to destroy it.
// See RenderViewHostManager::RendererAbortedProvisionalLoad.
if (info->is_download() ||
- (response->response_head.headers &&
- response->response_head.headers->response_code() == 204)) {
+ (response->headers && response->headers->response_code() == 204)) {
return next_handler_->OnResponseStarted(request_id, response);
}
@@ -190,7 +191,7 @@
// telling the old RenderViewHost to run its onunload handler.
void CrossSiteResourceHandler::StartCrossSiteTransition(
int request_id,
- ResourceResponse* response,
+ content::ResourceResponse* response,
const GlobalRequestID& global_id) {
in_cross_site_transition_ = true;
request_id_ = request_id;

Powered by Google App Engine
This is Rietveld 408576698