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

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 23830007: Support byte range requests when routing resource requests directly through the browser process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 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 | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_security_policy_impl.cc
===================================================================
--- content/browser/child_process_security_policy_impl.cc (revision 223418)
+++ content/browser/child_process_security_policy_impl.cc (working copy)
@@ -11,7 +11,9 @@
#include "base/platform_file.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
+#include "content/browser/plugin_process_host.h"
#include "content/browser/site_instance_impl.h"
+#include "content/public/browser/child_process_data.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/bindings_policy.h"
@@ -802,6 +804,17 @@
bool ChildProcessSecurityPolicyImpl::CanSendCookiesForOrigin(int child_id,
const GURL& gurl) {
+ for (PluginProcessHostIterator iter; !iter.Done(); ++iter) {
+ if (iter.GetData().process_type == child_id) {
+ if (iter.GetData().process_type == PROCESS_TYPE_PLUGIN) {
+ // NPAPI plugin processes are unsandboxed and so are trusted. Plugins
+ // can make request to any origin.
+ return true;
+ }
+ break;
+ }
+ }
+
base::AutoLock lock(lock_);
SecurityStateMap::iterator state = security_state_.find(child_id);
if (state == security_state_.end())
« no previous file with comments | « no previous file | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698