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

Unified Diff: content/renderer/pepper/pepper_url_loader_host.cc

Issue 606993002: [ServiceWorker] Set setSkipServiceWorker flag of the request from plugins with private permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_url_loader_host.cc
diff --git a/content/renderer/pepper/pepper_url_loader_host.cc b/content/renderer/pepper/pepper_url_loader_host.cc
index 9a6ce723a213cf8af0ea85750ccbfcad4ce5e8bc..5f70dfa83b7123381c913c30da5407cbf87fe398 100644
--- a/content/renderer/pepper/pepper_url_loader_host.cc
+++ b/content/renderer/pepper/pepper_url_loader_host.cc
@@ -259,6 +259,10 @@ int32_t PepperURLLoaderHost::InternalOnHostMsgOpen(
web_request.setRequestContext(WebURLRequest::RequestContextPlugin);
web_request.setRequestorProcessID(renderer_ppapi_host_->GetPluginPID());
+ // The requests from the plugins with private permission which can bypass same
+ // origin must skip the ServiceWorker.
+ web_request.setSkipServiceWorker(
+ host()->permissions().HasPermission(ppapi::PERMISSION_PRIVATE));
WebURLLoaderOptions options;
if (has_universal_access_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698