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

Unified Diff: content/renderer/render_process_impl.cc

Issue 2566583002: Change allowed bindings to be per RenderFrame instead of per RenderView. (Closed)
Patch Set: Created 3 years, 11 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: content/renderer/render_process_impl.cc
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index fa6012ceace8c33a6351ee5ca18a3dd84f8314fc..b69523a254a1b54e4eced9575547ca5b9b53e541 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -29,6 +29,7 @@
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "content/child/site_isolation_stats_gatherer.h"
+#include "content/public/common/bindings_policy.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
@@ -186,6 +187,11 @@ RenderProcessImpl::RenderProcessImpl()
SiteIsolationStatsGatherer::SetEnabled(
GetContentClient()->renderer()->ShouldGatherSiteIsolationStats());
+
+ if (command_line.HasSwitch(switches::kDomAutomationController))
+ enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION;
+ if (command_line.HasSwitch(switches::kStatsCollectionController))
+ enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION;
}
RenderProcessImpl::~RenderProcessImpl() {

Powered by Google App Engine
This is Rietveld 408576698