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

Unified Diff: net/url_request/url_request_job.h

Issue 398903002: Plumb redirect info out of net, through content, and into child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: darin comments Created 6 years, 4 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
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.h
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 2942e79d616c560924bad988d04ef890108df9bb..2dcd67af878b0f814cc234bad787abb48a1b14cc 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -19,6 +19,7 @@
#include "net/base/request_priority.h"
#include "net/base/upload_progress.h"
#include "net/cookies/canonical_cookie.h"
+#include "net/url_request/redirect_info.h"
#include "url/gurl.h"
namespace net {
@@ -364,7 +365,7 @@ class NET_EXPORT URLRequestJob
// Called in response to a redirect that was not canceled to follow the
// redirect. The current job will be replaced with a new job loading the
// given redirect destination.
- void FollowRedirect(const GURL& location, int http_status_code);
+ void FollowRedirect(const RedirectInfo& redirect_info);
// Called after every raw read. If |bytes_read| is > 0, this indicates
// a successful read of |bytes_read| unfiltered bytes. If |bytes_read|
@@ -384,6 +385,10 @@ class NET_EXPORT URLRequestJob
// The default implementation does nothing.
virtual void UpdatePacketReadTimes();
+ // Computes a new RedirectInfo based on receiving a redirect response of
+ // |location| and |http_status_code|.
+ RedirectInfo ComputeRedirectInfo(const GURL& location, int http_status_code);
+
// Indicates that the job is done producing data, either it has completed
// all the data or an error has been encountered. Set exclusively by
// NotifyDone so that it is kept in sync with the request.
@@ -419,8 +424,7 @@ class NET_EXPORT URLRequestJob
int64 expected_content_size_;
// Set when a redirect is deferred.
- GURL deferred_redirect_url_;
- int deferred_redirect_status_code_;
+ RedirectInfo deferred_redirect_info_;
// The network delegate to use with this request, if any.
NetworkDelegate* network_delegate_;
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698