| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // non-default referrer policy. Only the default referrer policy requires | 115 // non-default referrer policy. Only the default referrer policy requires |
| 116 // the referrer to be cleared on transitions from HTTPS to HTTP. | 116 // the referrer to be cleared on transitions from HTTPS to HTTP. |
| 117 enum ReferrerPolicy { | 117 enum ReferrerPolicy { |
| 118 CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, | 118 CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE, |
| 119 NEVER_CLEAR_REFERRER, | 119 NEVER_CLEAR_REFERRER, |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 // This class handles network interception. Use with | 122 // This class handles network interception. Use with |
| 123 // (Un)RegisterRequestInterceptor. | 123 // (Un)RegisterRequestInterceptor. |
| 124 class NET_EXPORT Interceptor { | 124 class NET_EXPORT Interceptor { |
| 125 public: | 125 public: |
| 126 virtual ~Interceptor() {} | 126 virtual ~Interceptor() {} |
| 127 | 127 |
| 128 // Called for every request made. Should return a new job to handle the | 128 // Called for every request made. Should return a new job to handle the |
| 129 // request if it should be intercepted, or NULL to allow the request to | 129 // request if it should be intercepted, or NULL to allow the request to |
| 130 // be handled in the normal manner. | 130 // be handled in the normal manner. |
| 131 virtual URLRequestJob* MaybeIntercept( | 131 virtual URLRequestJob* MaybeIntercept( |
| 132 URLRequest* request, NetworkDelegate* network_delegate) = 0; | 132 URLRequest* request, NetworkDelegate* network_delegate) = 0; |
| 133 | 133 |
| 134 // Called after having received a redirect response, but prior to the | 134 // Called after having received a redirect response, but prior to the |
| 135 // the request delegate being informed of the redirect. Can return a new | 135 // the request delegate being informed of the redirect. Can return a new |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 | 913 |
| 914 // The cookie store to be used for this request. | 914 // The cookie store to be used for this request. |
| 915 scoped_refptr<CookieStore> cookie_store_; | 915 scoped_refptr<CookieStore> cookie_store_; |
| 916 | 916 |
| 917 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 917 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 918 }; | 918 }; |
| 919 | 919 |
| 920 } // namespace net | 920 } // namespace net |
| 921 | 921 |
| 922 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 922 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |