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

Unified Diff: content/renderer/npapi/webplugin_impl.cc

Issue 618583003: [ServiceWorker] Set setSkipServiceWorker flag of the request from NPAPI plugins (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 | « content/child/npapi/plugin_url_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/npapi/webplugin_impl.cc
diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc
index 16dc08a15eac4fa5adf08257e595f83867c5f45e..4370dec79222cc9477692a4dc2ee52dbdbe742cf 100644
--- a/content/renderer/npapi/webplugin_impl.cc
+++ b/content/renderer/npapi/webplugin_impl.cc
@@ -734,6 +734,8 @@ WebPluginImpl::RoutingStatus WebPluginImpl::RouteToFrame(
request.setFirstPartyForCookies(
webframe_->document().firstPartyForCookies());
request.setHasUserGesture(popups_allowed);
+ // ServiceWorker is disabled for NPAPI.
+ request.setSkipServiceWorker(true);
if (len > 0) {
if (!SetPostData(&request, buf, len)) {
// Uhoh - we're in trouble. There isn't a good way
@@ -1288,6 +1290,8 @@ bool WebPluginImpl::InitiateHTTPRequest(unsigned long resource_id,
// (RequestContextPlugin)?
info.request.setRequestContext(WebURLRequest::RequestContextPlugin);
info.request.setHTTPMethod(WebString::fromUTF8(method));
+ // ServiceWorker is disabled for NPAPI.
+ info.request.setSkipServiceWorker(true);
info.pending_failure_notification = false;
info.notify_redirects = notify_redirects;
info.is_plugin_src_load = is_plugin_src_load;
« no previous file with comments | « content/child/npapi/plugin_url_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698