• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_URL_REQUEST_REDIRECT_INFO_H_
6 #define NET_URL_REQUEST_REDIRECT_INFO_H_
7 
8 #include <string>
9 
10 #include "net/base/net_export.h"
11 #include "url/gurl.h"
12 
13 namespace net {
14 
15 // RedirectInfo captures information about a redirect and any fields in a
16 // request that change. This struct must be kept in sync with
17 // content/common/resource_messages.h.
18 struct NET_EXPORT RedirectInfo {
19   RedirectInfo();
20   ~RedirectInfo();
21 
22   // The status code for the redirect response. This is almost redundant with
23   // the response headers, but some URLRequestJobs emit redirects without
24   // headers.
25   int status_code;
26 
27   // The new request method. Depending on the response code, the request method
28   // may change.
29   std::string new_method;
30 
31   // The new request URL.
32   GURL new_url;
33 
34   // The new first-party URL for cookies.
35   GURL new_first_party_for_cookies;
36 
37   // The new HTTP referrer header.
38   std::string new_referrer;
39 };
40 
41 }  // namespace net
42 
43 #endif  // NET_URL_REQUEST_REDIRECT_INFO_H_
44