| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/child/web_url_request_util.h" | 5 #include "content/child/web_url_request_util.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 const blink::WebURLRequest& request) { | 306 const blink::WebURLRequest& request) { |
| 307 return static_cast<FetchRequestMode>(request.getFetchRequestMode()); | 307 return static_cast<FetchRequestMode>(request.getFetchRequestMode()); |
| 308 } | 308 } |
| 309 | 309 |
| 310 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_OMIT, | 310 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_OMIT, |
| 311 WebURLRequest::FetchCredentialsModeOmit); | 311 WebURLRequest::FetchCredentialsModeOmit); |
| 312 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_SAME_ORIGIN, | 312 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_SAME_ORIGIN, |
| 313 WebURLRequest::FetchCredentialsModeSameOrigin); | 313 WebURLRequest::FetchCredentialsModeSameOrigin); |
| 314 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_INCLUDE, | 314 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_INCLUDE, |
| 315 WebURLRequest::FetchCredentialsModeInclude); | 315 WebURLRequest::FetchCredentialsModeInclude); |
| 316 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_PASSWORD, |
| 317 WebURLRequest::FetchCredentialsModePassword); |
| 316 | 318 |
| 317 FetchCredentialsMode GetFetchCredentialsModeForWebURLRequest( | 319 FetchCredentialsMode GetFetchCredentialsModeForWebURLRequest( |
| 318 const blink::WebURLRequest& request) { | 320 const blink::WebURLRequest& request) { |
| 319 return static_cast<FetchCredentialsMode>(request.getFetchCredentialsMode()); | 321 return static_cast<FetchCredentialsMode>(request.getFetchCredentialsMode()); |
| 320 } | 322 } |
| 321 | 323 |
| 322 STATIC_ASSERT_ENUM(FetchRedirectMode::FOLLOW_MODE, | 324 STATIC_ASSERT_ENUM(FetchRedirectMode::FOLLOW_MODE, |
| 323 WebURLRequest::FetchRedirectModeFollow); | 325 WebURLRequest::FetchRedirectModeFollow); |
| 324 STATIC_ASSERT_ENUM(FetchRedirectMode::ERROR_MODE, | 326 STATIC_ASSERT_ENUM(FetchRedirectMode::ERROR_MODE, |
| 325 WebURLRequest::FetchRedirectModeError); | 327 WebURLRequest::FetchRedirectModeError); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 bool stale_copy_in_cache, | 445 bool stale_copy_in_cache, |
| 444 int reason, | 446 int reason, |
| 445 bool was_ignored_by_handler) { | 447 bool was_ignored_by_handler) { |
| 446 blink::WebURLError error = | 448 blink::WebURLError error = |
| 447 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); | 449 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); |
| 448 error.wasIgnoredByHandler = was_ignored_by_handler; | 450 error.wasIgnoredByHandler = was_ignored_by_handler; |
| 449 return error; | 451 return error; |
| 450 } | 452 } |
| 451 | 453 |
| 452 } // namespace content | 454 } // namespace content |
| OLD | NEW |