Index: content/browser/loader/resource_dispatcher_host_impl.cc |
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc |
index 2b532814b739244026e1a384f8dc823cebcb4c7b..a37ca06f7d6eb9860269bc9ddf758e785185db0a 100644 |
--- a/content/browser/loader/resource_dispatcher_host_impl.cc |
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc |
@@ -77,6 +77,7 @@ |
#include "content/public/browser/user_metrics.h" |
#include "content/public/common/content_switches.h" |
#include "content/public/common/process_type.h" |
+#include "content/public/common/site_isolation_policy.h" |
#include "ipc/ipc_message_macros.h" |
#include "ipc/ipc_message_start.h" |
#include "net/base/auth.h" |
@@ -1386,10 +1387,11 @@ scoped_ptr<ResourceHandler> ResourceDispatcherHostImpl::CreateResourceHandler( |
// to drive the transfer. |
bool is_swappable_navigation = |
request_data.resource_type == RESOURCE_TYPE_MAIN_FRAME; |
- // If we are using --site-per-process, install it for subframes as well. |
+ // If out-of-process iframes are possible, then all subframe requests need |
+ // to go through the CrossSiteResourceHandler to enforce the site isolation |
+ // policy. |
if (!is_swappable_navigation && |
- base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSitePerProcess)) { |
+ SiteIsolationPolicy::AreCrossProcessFramesPossible()) { |
is_swappable_navigation = |
request_data.resource_type == RESOURCE_TYPE_SUB_FRAME; |
} |