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

Side by Side Diff: content/renderer/pepper/pepper_url_loader_host.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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/pepper/pepper_url_loader_host.h" 5 #include "content/renderer/pepper/pepper_url_loader_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 10 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 WebURLRequest web_request; 253 WebURLRequest web_request;
254 if (!CreateWebURLRequest( 254 if (!CreateWebURLRequest(
255 pp_instance(), &filled_in_request_data, frame, &web_request)) { 255 pp_instance(), &filled_in_request_data, frame, &web_request)) {
256 return PP_ERROR_FAILED; 256 return PP_ERROR_FAILED;
257 } 257 }
258 258
259 web_request.setRequestContext(WebURLRequest::RequestContextPlugin); 259 web_request.setRequestContext(WebURLRequest::RequestContextPlugin);
260 web_request.setRequestorProcessID(renderer_ppapi_host_->GetPluginPID()); 260 web_request.setRequestorProcessID(renderer_ppapi_host_->GetPluginPID());
261 // The requests from the plugins with private permission which can bypass same 261 // The requests from the plugins with private permission which can bypass same
262 // origin must skip the ServiceWorker. 262 // origin must skip the ServiceWorker.
263 web_request.setSkipServiceWorker( 263 web_request.setServiceWorkerMode(
264 host()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE) 264 host()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE)
265 ? WebURLRequest::SkipServiceWorker::All 265 ? WebURLRequest::ServiceWorkerMode::None
266 : WebURLRequest::SkipServiceWorker::None); 266 : WebURLRequest::ServiceWorkerMode::All);
267 267
268 WebAssociatedURLLoaderOptions options; 268 WebAssociatedURLLoaderOptions options;
269 if (has_universal_access_) { 269 if (has_universal_access_) {
270 options.allowCredentials = true; 270 options.allowCredentials = true;
271 options.crossOriginRequestPolicy = 271 options.crossOriginRequestPolicy =
272 WebAssociatedURLLoaderOptions::CrossOriginRequestPolicyAllow; 272 WebAssociatedURLLoaderOptions::CrossOriginRequestPolicyAllow;
273 } else { 273 } else {
274 // All other HTTP requests are untrusted. 274 // All other HTTP requests are untrusted.
275 options.untrustedHTTP = true; 275 options.untrustedHTTP = true;
276 if (filled_in_request_data.allow_cross_origin_requests) { 276 if (filled_in_request_data.allow_cross_origin_requests) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 SendUpdateToPlugin( 436 SendUpdateToPlugin(
437 base::MakeUnique<PpapiPluginMsg_URLLoader_UpdateProgress>( 437 base::MakeUnique<PpapiPluginMsg_URLLoader_UpdateProgress>(
438 record_upload ? bytes_sent_ : -1, 438 record_upload ? bytes_sent_ : -1,
439 record_upload ? total_bytes_to_be_sent_ : -1, 439 record_upload ? total_bytes_to_be_sent_ : -1,
440 record_download ? bytes_received_ : -1, 440 record_download ? bytes_received_ : -1,
441 record_download ? total_bytes_to_be_received_ : -1)); 441 record_download ? total_bytes_to_be_received_ : -1));
442 } 442 }
443 } 443 }
444 444
445 } // namespace content 445 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/fetchers/multi_resolution_image_resource_fetcher.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698