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

Unified Diff: chrome/browser/prerender/prerender_resource_throttle.cc

Issue 893843003: Add RedirectInfo as a redirect parameter to ResourceThrottles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document ResourceThrottle Created 5 years, 10 months 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: chrome/browser/prerender/prerender_resource_throttle.cc
diff --git a/chrome/browser/prerender/prerender_resource_throttle.cc b/chrome/browser/prerender/prerender_resource_throttle.cc
index 70e1aeefcae471fec122a3e321d7fe71cb7ce56b..d80cfb3b22465606b2fdf52b7d6a133bd2a7b691 100644
--- a/chrome/browser/prerender/prerender_resource_throttle.cc
+++ b/chrome/browser/prerender/prerender_resource_throttle.cc
@@ -12,6 +12,7 @@
#include "content/public/browser/resource_controller.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents.h"
+#include "net/url_request/redirect_info.h"
#include "net/url_request/url_request.h"
using content::ResourceType;
@@ -47,8 +48,9 @@ void PrerenderResourceThrottle::WillStartRequest(bool* defer) {
request_->url()));
}
-void PrerenderResourceThrottle::WillRedirectRequest(const GURL& new_url,
- bool* defer) {
+void PrerenderResourceThrottle::WillRedirectRequest(
+ const net::RedirectInfo& redirect_info,
+ bool* defer) {
const content::ResourceRequestInfo* info =
content::ResourceRequestInfo::ForRequest(request_);
*defer = true;
@@ -60,7 +62,8 @@ void PrerenderResourceThrottle::WillRedirectRequest(const GURL& new_url,
FROM_HERE,
base::Bind(&PrerenderResourceThrottle::WillRedirectRequestOnUI,
AsWeakPtr(), header, info->GetResourceType(), info->IsAsync(),
- info->GetChildID(), info->GetRenderFrameID(), new_url));
+ info->GetChildID(), info->GetRenderFrameID(),
+ redirect_info.new_url));
}
const char* PrerenderResourceThrottle::GetNameForLogging() const {
« no previous file with comments | « chrome/browser/prerender/prerender_resource_throttle.h ('k') | chrome/browser/prerender/prerender_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698