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