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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1507023004: Harden the implementation of '--disable-web-security' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: esprehn feedback Created 5 years 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/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 80fcea5d7d25cdab0c9ac5e0c44bf6c7a78d05b7..040997435e1da6c708852d4d92c273152b0d7cb1 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1657,6 +1657,8 @@ bool RenderProcessHostImpl::OnMessageReceived(const IPC::Message& msg) {
OnShutdownRequest)
IPC_MESSAGE_HANDLER(RenderProcessHostMsg_SuddenTerminationChanged,
SuddenTerminationChanged)
+ IPC_MESSAGE_HANDLER(RenderProcessHostMsg_GetUniversalAccessDisposition,
+ OnGetUniversalAccessDisposition);
IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction,
OnUserMetricsRecordAction)
IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML)
@@ -2392,6 +2394,13 @@ void RenderProcessHostImpl::SuddenTerminationChanged(bool enabled) {
SetSuddenTerminationAllowed(enabled);
}
+void RenderProcessHostImpl::OnGetUniversalAccessDisposition(
+ bool* is_access_grantable) {
+ DCHECK(is_access_grantable);
+ *is_access_grantable = base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableWebSecurity);
+}
+
void RenderProcessHostImpl::UpdateProcessPriority() {
if (!child_process_launcher_.get() || child_process_launcher_->IsStarting()) {
is_process_backgrounded_ = false;

Powered by Google App Engine
This is Rietveld 408576698