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

Side by Side Diff: content/renderer/npapi/webplugin_impl.cc

Issue 197083003: Temporarily disable direct NPAPI requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/npapi/webplugin_impl.h" 5 #include "content/renderer/npapi/webplugin_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 resource_client->DidFail(resource_id); 1223 resource_client->DidFail(resource_id);
1224 return; 1224 return;
1225 } 1225 }
1226 1226
1227 // CreateResourceClient() sends a synchronous IPC message so it's possible 1227 // CreateResourceClient() sends a synchronous IPC message so it's possible
1228 // that TearDownPluginInstance() may have been called in the nested 1228 // that TearDownPluginInstance() may have been called in the nested
1229 // message loop. If so, don't start the request. 1229 // message loop. If so, don't start the request.
1230 if (!delegate_) 1230 if (!delegate_)
1231 return; 1231 return;
1232 1232
1233 if (!CommandLine::ForCurrentProcess()->HasSwitch( 1233 if (CommandLine::ForCurrentProcess()->HasSwitch(
1234 switches::kDisableDirectNPAPIRequests)) { 1234 switches::kDirectNPAPIRequests)) {
1235 // We got here either because the plugin called GetURL/PostURL, or because 1235 // We got here either because the plugin called GetURL/PostURL, or because
1236 // we're fetching the data for an embed tag. If we're in multi-process mode, 1236 // we're fetching the data for an embed tag. If we're in multi-process mode,
1237 // we want to fetch the data in the plugin process as the renderer won't be 1237 // we want to fetch the data in the plugin process as the renderer won't be
1238 // able to request any origin when site isolation is in place. So bounce 1238 // able to request any origin when site isolation is in place. So bounce
1239 // this request back to the plugin process which will use ResourceDispatcher 1239 // this request back to the plugin process which will use ResourceDispatcher
1240 // to fetch the url. 1240 // to fetch the url.
1241 1241
1242 // TODO(jam): any better way of getting this? Can't find a way to get 1242 // TODO(jam): any better way of getting this? Can't find a way to get
1243 // frame()->loader()->outgoingReferrer() which 1243 // frame()->loader()->outgoingReferrer() which
1244 // WebFrameImpl::setReferrerForRequest does. 1244 // WebFrameImpl::setReferrerForRequest does.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 case PLUGIN_SRC: 1535 case PLUGIN_SRC:
1536 webframe_->setReferrerForRequest(*request, plugin_url_); 1536 webframe_->setReferrerForRequest(*request, plugin_url_);
1537 break; 1537 break;
1538 1538
1539 default: 1539 default:
1540 break; 1540 break;
1541 } 1541 }
1542 } 1542 }
1543 1543
1544 } // namespace content 1544 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698