| Index: net/http/http_response_headers.h
|
| diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
|
| index deba3b6d974fd45c42f20d8b7f94b14182d1573f..2707316395eb14c46ed091003f40799c62003534 100644
|
| --- a/net/http/http_response_headers.h
|
| +++ b/net/http/http_response_headers.h
|
| @@ -15,6 +15,7 @@
|
| #include "net/base/net_export.h"
|
| #include "net/base/net_log.h"
|
| #include "net/http/http_version.h"
|
| +#include "url/gurl.h"
|
|
|
| class Pickle;
|
| class PickleIterator;
|
| @@ -190,6 +191,16 @@ class NET_EXPORT HttpResponseHeaders
|
| // redirect.
|
| static bool IsRedirectResponseCode(int response_code);
|
|
|
| + // Replace the Location header and HTTP status line, then mark the redirect
|
| + // URL as safe, i.e. assume that the redirect is always allowed.
|
| + void SetSafeRedirect(GURL new_url);
|
| +
|
| + // Whether |location| matches a redirect target that has been marked as safe.
|
| + bool IsSafeRedirect(const GURL& location) const;
|
| +
|
| + // Whether a safe redirection target has been set.
|
| + bool HasSafeRedirect() const;
|
| +
|
| // Returns true if the response cannot be reused without validation. The
|
| // result is relative to the current_time parameter, which is a parameter to
|
| // support unit testing. The request_time parameter indicates the time at
|
| @@ -397,6 +408,9 @@ class NET_EXPORT HttpResponseHeaders
|
| // This is the parsed HTTP response code.
|
| int response_code_;
|
|
|
| + // A redirect target that has explicitly been marked as safe.
|
| + GURL allowed_unsafe_redirect_url_;
|
| +
|
| // The normalized http version (consistent with what GetStatusLine() returns).
|
| HttpVersion http_version_;
|
|
|
|
|