| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 const blink::WebURLRequest& request) { | 305 const blink::WebURLRequest& request) { |
| 306 return static_cast<FetchRequestMode>(request.getFetchRequestMode()); | 306 return static_cast<FetchRequestMode>(request.getFetchRequestMode()); |
| 307 } | 307 } |
| 308 | 308 |
| 309 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_OMIT, | 309 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_OMIT, |
| 310 WebURLRequest::FetchCredentialsModeOmit); | 310 WebURLRequest::FetchCredentialsModeOmit); |
| 311 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_SAME_ORIGIN, | 311 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_SAME_ORIGIN, |
| 312 WebURLRequest::FetchCredentialsModeSameOrigin); | 312 WebURLRequest::FetchCredentialsModeSameOrigin); |
| 313 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_INCLUDE, | 313 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_INCLUDE, |
| 314 WebURLRequest::FetchCredentialsModeInclude); | 314 WebURLRequest::FetchCredentialsModeInclude); |
| 315 STATIC_ASSERT_ENUM(FETCH_CREDENTIALS_MODE_PASSWORD, |
| 316 WebURLRequest::FetchCredentialsModePassword); |
| 315 | 317 |
| 316 FetchCredentialsMode GetFetchCredentialsModeForWebURLRequest( | 318 FetchCredentialsMode GetFetchCredentialsModeForWebURLRequest( |
| 317 const blink::WebURLRequest& request) { | 319 const blink::WebURLRequest& request) { |
| 318 return static_cast<FetchCredentialsMode>(request.getFetchCredentialsMode()); | 320 return static_cast<FetchCredentialsMode>(request.getFetchCredentialsMode()); |
| 319 } | 321 } |
| 320 | 322 |
| 321 STATIC_ASSERT_ENUM(FetchRedirectMode::FOLLOW_MODE, | 323 STATIC_ASSERT_ENUM(FetchRedirectMode::FOLLOW_MODE, |
| 322 WebURLRequest::FetchRedirectModeFollow); | 324 WebURLRequest::FetchRedirectModeFollow); |
| 323 STATIC_ASSERT_ENUM(FetchRedirectMode::ERROR_MODE, | 325 STATIC_ASSERT_ENUM(FetchRedirectMode::ERROR_MODE, |
| 324 WebURLRequest::FetchRedirectModeError); | 326 WebURLRequest::FetchRedirectModeError); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 bool stale_copy_in_cache, | 444 bool stale_copy_in_cache, |
| 443 int reason, | 445 int reason, |
| 444 bool was_ignored_by_handler) { | 446 bool was_ignored_by_handler) { |
| 445 blink::WebURLError error = | 447 blink::WebURLError error = |
| 446 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); | 448 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); |
| 447 error.wasIgnoredByHandler = was_ignored_by_handler; | 449 error.wasIgnoredByHandler = was_ignored_by_handler; |
| 448 return error; | 450 return error; |
| 449 } | 451 } |
| 450 | 452 |
| 451 } // namespace content | 453 } // namespace content |
| OLD | NEW |