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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 1208143002: Move existing kSitePerProcess checks to a policy-oracle object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@swapped_out_cmdline_checks
Patch Set: Partial fixes to Nasko's comments. Created 5 years, 5 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
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 4351b22cc2bff7341a700543ea31b98dc910c69f..fbbbee41c5c3b97c2d8ecc12c9263c25e0338cde 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -19,6 +19,7 @@
#include "content/grit/content_resources.h"
#include "content/public/child/v8_value_converter.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/site_isolation_policy.h"
#include "content/public/common/url_constants.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
@@ -473,8 +474,7 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
resources.push_back(std::make_pair("guestViewEvents",
IDR_GUEST_VIEW_EVENTS_JS));
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- ::switches::kSitePerProcess)) {
+ if (content::SiteIsolationPolicy::AreCrossProcessFramesPossible()) {
Charlie Reis 2015/07/13 22:13:15 This one is for webview (GuestsShouldUseCrossProce
ncarter (slow) 2015/07/20 17:45:46 Done.
resources.push_back(std::make_pair("guestViewIframe",
IDR_GUEST_VIEW_IFRAME_JS));
resources.push_back(std::make_pair("guestViewIframeContainer",
@@ -518,8 +518,7 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
resources.push_back(std::make_pair("webViewEvents", IDR_WEB_VIEW_EVENTS_JS));
resources.push_back(std::make_pair("webViewInternal",
IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS));
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- ::switches::kSitePerProcess)) {
+ if (content::SiteIsolationPolicy::AreCrossProcessFramesPossible()) {
Charlie Reis 2015/07/13 22:13:15 Ditto.
ncarter (slow) 2015/07/20 17:45:46 Done.
resources.push_back(std::make_pair("webViewIframe",
IDR_WEB_VIEW_IFRAME_JS));
}
@@ -1433,8 +1432,7 @@ void Dispatcher::RequireGuestViewModules(ScriptContext* context) {
module_system->Require("webViewApiMethods");
module_system->Require("webViewAttributes");
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- ::switches::kSitePerProcess)) {
+ if (content::SiteIsolationPolicy::AreCrossProcessFramesPossible()) {
Charlie Reis 2015/07/13 22:13:15 Ditto.
ncarter (slow) 2015/07/20 17:45:46 Done.
module_system->Require("webViewIframe");
}
}
« content/public/common/site_isolation_policy.cc ('K') | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698