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

Side by Side Diff: content/browser/zygote_host/zygote_host_impl_linux.cc

Issue 562073002: Forward kPpapiInProcess flag to zygote process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put zygote flags in alphabetical order Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/zygote_host/zygote_host_impl_linux.h" 5 #include "content/browser/zygote_host/zygote_host_impl_linux.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/socket.h> 8 #include <sys/socket.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 *base::CommandLine::ForCurrentProcess(); 115 *base::CommandLine::ForCurrentProcess();
116 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) { 116 if (browser_command_line.HasSwitch(switches::kZygoteCmdPrefix)) {
117 cmd_line.PrependWrapper( 117 cmd_line.PrependWrapper(
118 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix)); 118 browser_command_line.GetSwitchValueNative(switches::kZygoteCmdPrefix));
119 } 119 }
120 // Append any switches from the browser process that need to be forwarded on 120 // Append any switches from the browser process that need to be forwarded on
121 // to the zygote/renderers. 121 // to the zygote/renderers.
122 // Should this list be obtained from browser_render_process_host.cc? 122 // Should this list be obtained from browser_render_process_host.cc?
123 static const char* kForwardSwitches[] = { 123 static const char* kForwardSwitches[] = {
124 switches::kAllowSandboxDebugging, 124 switches::kAllowSandboxDebugging,
125 switches::kLoggingLevel, 125 switches::kDisableSeccompFilterSandbox,
126 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. 126 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr.
127 switches::kV,
128 switches::kVModule,
129 switches::kRegisterPepperPlugins,
130 switches::kDisableSeccompFilterSandbox,
131
132 // Zygote process needs to know what resources to have loaded when it 127 // Zygote process needs to know what resources to have loaded when it
133 // becomes a renderer process. 128 // becomes a renderer process.
134 switches::kForceDeviceScaleFactor, 129 switches::kForceDeviceScaleFactor,
135 130 switches::kLoggingLevel,
136 switches::kNoSandbox, 131 switches::kNoSandbox,
132 switches::kPpapiInProcess,
133 switches::kRegisterPepperPlugins,
134 switches::kV,
135 switches::kVModule,
137 }; 136 };
138 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, 137 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches,
139 arraysize(kForwardSwitches)); 138 arraysize(kForwardSwitches));
140 139
141 GetContentClient()->browser()->AppendExtraCommandLineSwitches(&cmd_line, -1); 140 GetContentClient()->browser()->AppendExtraCommandLineSwitches(&cmd_line, -1);
142 141
143 sandbox_binary_ = sandbox_cmd.c_str(); 142 sandbox_binary_ = sandbox_cmd.c_str();
144 143
145 // A non empty sandbox_cmd means we want a SUID sandbox. 144 // A non empty sandbox_cmd means we want a SUID sandbox.
146 using_suid_sandbox_ = !sandbox_cmd.empty(); 145 using_suid_sandbox_ = !sandbox_cmd.empty();
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 return pid_; 559 return pid_;
561 } 560 }
562 561
563 int ZygoteHostImpl::GetSandboxStatus() const { 562 int ZygoteHostImpl::GetSandboxStatus() const {
564 if (have_read_sandbox_status_word_) 563 if (have_read_sandbox_status_word_)
565 return sandbox_status_; 564 return sandbox_status_;
566 return 0; 565 return 0;
567 } 566 }
568 567
569 } // namespace content 568 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698