Chromium Code Reviews| 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_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 // redirect. The HTTP status code (e.g., 302) is filled into | 150 // redirect. The HTTP status code (e.g., 302) is filled into |
| 151 // |*http_status_code| to signify the type of redirect. | 151 // |*http_status_code| to signify the type of redirect. |
| 152 // | 152 // |
| 153 // The caller is responsible for following the redirect by setting up an | 153 // The caller is responsible for following the redirect by setting up an |
| 154 // appropriate replacement Job. Note that the redirected location may be | 154 // appropriate replacement Job. Note that the redirected location may be |
| 155 // invalid, the caller should be sure it can handle this. | 155 // invalid, the caller should be sure it can handle this. |
| 156 // | 156 // |
| 157 // The default implementation inspects the response_info_. | 157 // The default implementation inspects the response_info_. |
| 158 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); | 158 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); |
| 159 | 159 |
| 160 // Called to determine if it is okay to copy the reference fragment from the | |
| 161 // original URL to the redirection target when the redirection target has no | |
| 162 // reference fragment. | |
|
mmenke
2014/04/01 20:26:51
nit: Also mention that it's only copied if locati
robwu
2014/04/01 20:46:33
Done.
| |
| 163 // | |
| 164 // The default implementation returns true. | |
| 165 virtual bool IsRedirectFragmentModificationAllowed( | |
| 166 const GURL& location) const OVERRIDE; | |
|
mmenke
2014/04/01 20:26:51
nit: Think "CopyFragmentOnRedirect" may be a litt
robwu
2014/04/01 20:46:33
Done. Now the method signatures fit on one line as
| |
| 167 | |
| 160 // Called to determine if it is okay to redirect this job to the specified | 168 // Called to determine if it is okay to redirect this job to the specified |
| 161 // location. This may be used to implement protocol-specific restrictions. | 169 // location. This may be used to implement protocol-specific restrictions. |
| 162 // If this function returns false, then the URLRequest will fail | 170 // If this function returns false, then the URLRequest will fail |
| 163 // reporting ERR_UNSAFE_REDIRECT. | 171 // reporting ERR_UNSAFE_REDIRECT. |
| 164 virtual bool IsSafeRedirect(const GURL& location); | 172 virtual bool IsSafeRedirect(const GURL& location); |
| 165 | 173 |
| 166 // Called to determine if this response is asking for authentication. Only | 174 // Called to determine if this response is asking for authentication. Only |
| 167 // makes sense for some types of requests. The caller is responsible for | 175 // makes sense for some types of requests. The caller is responsible for |
| 168 // obtaining the credentials passing them to SetAuth. | 176 // obtaining the credentials passing them to SetAuth. |
| 169 virtual bool NeedsAuth(); | 177 virtual bool NeedsAuth(); |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 NetworkDelegate* network_delegate_; | 424 NetworkDelegate* network_delegate_; |
| 417 | 425 |
| 418 base::WeakPtrFactory<URLRequestJob> weak_factory_; | 426 base::WeakPtrFactory<URLRequestJob> weak_factory_; |
| 419 | 427 |
| 420 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); | 428 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); |
| 421 }; | 429 }; |
| 422 | 430 |
| 423 } // namespace net | 431 } // namespace net |
| 424 | 432 |
| 425 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ | 433 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ |
| OLD | NEW |