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

Unified Diff: net/url_request/url_request_job.h

Issue 2917133002: Perform redirect checks before OnReceivedRedirect in //net. (Closed)
Patch Set: rebase Created 3 years, 6 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: 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 2341999ae5493b1e205343963b41d8cbc68549de..c6eb1285cd06cd104b4fae43227ceb20758aad6d 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -345,6 +345,10 @@ class NET_EXPORT URLRequestJob : public base::PowerObserver {
int buf_size,
const CompletionCallback& callback);
+ // Returns OK if |new_url| is a valid redirect target and an error code
+ // otherwise.
+ int CanFollowRedirect(const GURL& new_url);
+
// 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.

Powered by Google App Engine
This is Rietveld 408576698