Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: content/child/web_url_request_util.cc

Issue 2941883003: [ServiceWorker] Fetch event should return integrity value (Closed)
Patch Set: Address yhirano's comment #78 Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/web_url_request_util.h ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/child/web_url_request_util.h ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698