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

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

Issue 2714423002: Rename SkipServiceWorker to ServiceWorkerMode (Closed)
Patch Set: typos-- Created 3 years, 9 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 if (request.getExtraData()) { 478 if (request.getExtraData()) {
479 RequestExtraData* extra_data = 479 RequestExtraData* extra_data =
480 static_cast<RequestExtraData*>(request.getExtraData()); 480 static_cast<RequestExtraData*>(request.getExtraData());
481 block_mixed_plugin_content = extra_data->block_mixed_plugin_content(); 481 block_mixed_plugin_content = extra_data->block_mixed_plugin_content();
482 } 482 }
483 483
484 return blink::WebMixedContent::contextTypeFromRequestContext( 484 return blink::WebMixedContent::contextTypeFromRequestContext(
485 request.getRequestContext(), block_mixed_plugin_content); 485 request.getRequestContext(), block_mixed_plugin_content);
486 } 486 }
487 487
488 STATIC_ASSERT_ENUM(SkipServiceWorker::NONE, 488 STATIC_ASSERT_ENUM(ServiceWorkerMode::NONE,
489 WebURLRequest::SkipServiceWorker::None); 489 WebURLRequest::ServiceWorkerMode::None);
490 STATIC_ASSERT_ENUM(SkipServiceWorker::CONTROLLING, 490 STATIC_ASSERT_ENUM(ServiceWorkerMode::FOREIGN,
491 WebURLRequest::SkipServiceWorker::Controlling); 491 WebURLRequest::ServiceWorkerMode::Foreign);
492 STATIC_ASSERT_ENUM(SkipServiceWorker::ALL, 492 STATIC_ASSERT_ENUM(ServiceWorkerMode::ALL,
493 WebURLRequest::SkipServiceWorker::All); 493 WebURLRequest::ServiceWorkerMode::All);
494 494
495 SkipServiceWorker GetSkipServiceWorkerForWebURLRequest( 495 ServiceWorkerMode GetServiceWorkerModeForWebURLRequest(
496 const blink::WebURLRequest& request) { 496 const blink::WebURLRequest& request) {
497 return static_cast<SkipServiceWorker>(request.skipServiceWorker()); 497 return static_cast<ServiceWorkerMode>(request.getServiceWorkerMode());
498 } 498 }
499 499
500 blink::WebURLError CreateWebURLError(const blink::WebURL& unreachable_url, 500 blink::WebURLError CreateWebURLError(const blink::WebURL& unreachable_url,
501 bool stale_copy_in_cache, 501 bool stale_copy_in_cache,
502 int reason) { 502 int reason) {
503 blink::WebURLError error; 503 blink::WebURLError error;
504 error.domain = WebString::fromASCII(net::kErrorDomain); 504 error.domain = WebString::fromASCII(net::kErrorDomain);
505 error.reason = reason; 505 error.reason = reason;
506 error.unreachableURL = unreachable_url; 506 error.unreachableURL = unreachable_url;
507 error.staleCopyInCache = stale_copy_in_cache; 507 error.staleCopyInCache = stale_copy_in_cache;
(...skipping 15 matching lines...) Expand all
523 bool stale_copy_in_cache, 523 bool stale_copy_in_cache,
524 int reason, 524 int reason,
525 bool was_ignored_by_handler) { 525 bool was_ignored_by_handler) {
526 blink::WebURLError error = 526 blink::WebURLError error =
527 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason); 527 CreateWebURLError(unreachable_url, stale_copy_in_cache, reason);
528 error.wasIgnoredByHandler = was_ignored_by_handler; 528 error.wasIgnoredByHandler = was_ignored_by_handler;
529 return error; 529 return error;
530 } 530 }
531 531
532 } // namespace content 532 } // 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