| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // Callback function implemented by protocol handlers to create new jobs. | 76 // Callback function implemented by protocol handlers to create new jobs. |
| 77 // The factory may return NULL to indicate an error, which will cause other | 77 // The factory may return NULL to indicate an error, which will cause other |
| 78 // factories to be queried. If no factory handles the request, then the | 78 // factories to be queried. If no factory handles the request, then the |
| 79 // default job will be used. | 79 // default job will be used. |
| 80 typedef URLRequestJob* (ProtocolFactory)(URLRequest* request, | 80 typedef URLRequestJob* (ProtocolFactory)(URLRequest* request, |
| 81 NetworkDelegate* network_delegate, | 81 NetworkDelegate* network_delegate, |
| 82 const std::string& scheme); | 82 const std::string& scheme); |
| 83 | 83 |
| 84 // A ReferrerPolicy for the request can be set with | 84 // A ReferrerPolicy for the request can be set with |
| 85 // set_referrer_policy() and controls the contents of the Referer | 85 // set_referrer_policy() and controls the contents of the Referer |
| 86 // header when URLRequest follows server redirects. | 86 // header when URLRequest follows server redirects. Note that setting |
| 87 // a ReferrerPolicy on the request has no effect on the Referer header |
| 88 // of the initial leg of the request; the caller is responsible for |
| 89 // setting the initial Referer, and the ReferrerPolicy only controls |
| 90 // what happens to the Referer while following redirects. |
| 87 enum ReferrerPolicy { | 91 enum ReferrerPolicy { |
| 88 // Clear the referrer header if the protocol changes from HTTPS to | 92 // Clear the referrer header if the protocol changes from HTTPS to |
| 89 // HTTP. This is the default behavior of URLRequest. | 93 // HTTP. This is the default behavior of URLRequest. |
| 90 CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, | 94 CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, |
| 91 // A slight variant on | 95 // A slight variant on |
| 92 // CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: If the | 96 // CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: If the |
| 93 // request downgrades from HTTPS to HTTP, the referrer will be | 97 // request downgrades from HTTPS to HTTP, the referrer will be |
| 94 // cleared. If the request transitions cross-origin (but does not | 98 // cleared. If the request transitions cross-origin (but does not |
| 95 // downgrade), the referrer's granularity will be reduced (currently | 99 // downgrade), the referrer's granularity will be reduced (currently |
| 96 // stripped down to an origin rather than a full URL). Same-origin | 100 // stripped down to an origin rather than a full URL). Same-origin |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 | 857 |
| 854 // The raw header size of the response. | 858 // The raw header size of the response. |
| 855 int raw_header_size_; | 859 int raw_header_size_; |
| 856 | 860 |
| 857 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 861 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 858 }; | 862 }; |
| 859 | 863 |
| 860 } // namespace net | 864 } // namespace net |
| 861 | 865 |
| 862 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 866 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |