| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 STATIC_ASSERT_ENUM(FetchRedirectMode::ERROR_MODE, | 374 STATIC_ASSERT_ENUM(FetchRedirectMode::ERROR_MODE, |
| 375 WebURLRequest::kFetchRedirectModeError); | 375 WebURLRequest::kFetchRedirectModeError); |
| 376 STATIC_ASSERT_ENUM(FetchRedirectMode::MANUAL_MODE, | 376 STATIC_ASSERT_ENUM(FetchRedirectMode::MANUAL_MODE, |
| 377 WebURLRequest::kFetchRedirectModeManual); | 377 WebURLRequest::kFetchRedirectModeManual); |
| 378 | 378 |
| 379 FetchRedirectMode GetFetchRedirectModeForWebURLRequest( | 379 FetchRedirectMode GetFetchRedirectModeForWebURLRequest( |
| 380 const blink::WebURLRequest& request) { | 380 const blink::WebURLRequest& request) { |
| 381 return static_cast<FetchRedirectMode>(request.GetFetchRedirectMode()); | 381 return static_cast<FetchRedirectMode>(request.GetFetchRedirectMode()); |
| 382 } | 382 } |
| 383 | 383 |
| 384 std::string GetFetchIntegrityForWebURLRequest( |
| 385 const blink::WebURLRequest& request) { |
| 386 return request.GetFetchIntegrity().Utf8(); |
| 387 } |
| 388 |
| 384 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_AUXILIARY, | 389 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_AUXILIARY, |
| 385 WebURLRequest::kFrameTypeAuxiliary); | 390 WebURLRequest::kFrameTypeAuxiliary); |
| 386 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_NESTED, | 391 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_NESTED, |
| 387 WebURLRequest::kFrameTypeNested); | 392 WebURLRequest::kFrameTypeNested); |
| 388 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_NONE, | 393 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_NONE, |
| 389 WebURLRequest::kFrameTypeNone); | 394 WebURLRequest::kFrameTypeNone); |
| 390 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL, | 395 STATIC_ASSERT_ENUM(REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL, |
| 391 WebURLRequest::kFrameTypeTopLevel); | 396 WebURLRequest::kFrameTypeTopLevel); |
| 392 | 397 |
| 393 RequestContextFrameType GetRequestContextFrameTypeForWebURLRequest( | 398 RequestContextFrameType GetRequestContextFrameTypeForWebURLRequest( |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 bool stale_copy_in_cache, | 525 bool stale_copy_in_cache, |
| 521 int reason, | 526 int reason, |
| 522 bool was_ignored_by_handler) { | 527 bool was_ignored_by_handler) { |
| 523 blink::WebURLError error = | 528 blink::WebURLError error = |
| 524 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); | 529 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); |
| 525 error.was_ignored_by_handler = was_ignored_by_handler; | 530 error.was_ignored_by_handler = was_ignored_by_handler; |
| 526 return error; | 531 return error; |
| 527 } | 532 } |
| 528 | 533 |
| 529 } // namespace content | 534 } // namespace content |
| OLD | NEW |