File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 30
30
#include " chrome/common/chrome_switches.h"
31
31
#include " content/nw/src/api/app/app.h"
32
32
#include " content/nw/src/api/dispatcher_host.h"
33
+ #include " content/nw/src/breakpad_linux.h"
33
34
#include " content/nw/src/browser/printing/print_job_manager.h"
34
35
#include " content/nw/src/browser/shell_devtools_delegate.h"
35
36
#include " content/nw/src/common/shell_switches.h"
@@ -160,6 +161,7 @@ int ShellBrowserMainParts::PreCreateThreads() {
160
161
161
162
void ShellBrowserMainParts::Init () {
162
163
package_.reset (new nw::Package ());
164
+ CommandLine& command_line = *CommandLine::ForCurrentProcess ();
163
165
164
166
browser_context_.reset (new ShellBrowserContext (false , package ()));
165
167
off_the_record_browser_context_.reset (
@@ -181,7 +183,7 @@ void ShellBrowserMainParts::Init() {
181
183
int port = 0 ;
182
184
// See if the user specified a port on the command line (useful for
183
185
// automation). If not, use an ephemeral port by specifying 0.
184
- CommandLine& command_line = * CommandLine::ForCurrentProcess ();
186
+
185
187
if (command_line.HasSwitch (switches::kRemoteDebuggingPort )) {
186
188
int temp_port;
187
189
std::string port_str =
Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ void ShellMainDelegate::PreSandboxStartup() {
142
142
InitializeResourceBundle ();
143
143
144
144
CommandLine* command_line = CommandLine::ForCurrentProcess ();
145
+ std::string process_type =
146
+ command_line->GetSwitchValueASCII (switches::kProcessType );
147
+
148
+ if (process_type != switches::kZygoteProcess )
149
+ InitCrashReporter ();
145
150
146
151
// Just prevent sandbox.
147
152
command_line->AppendSwitch (switches::kNoSandbox );
@@ -159,11 +164,6 @@ void ShellMainDelegate::PreSandboxStartup() {
159
164
command_line->AppendSwitch (switches::kAllowFileAccessFromFiles );
160
165
command_line->AppendSwitch (switches::kEnableExperimentalWebPlatformFeatures );
161
166
command_line->AppendSwitch (switches::kEnableCssShaders );
162
- std::string process_type =
163
- command_line->GetSwitchValueASCII (switches::kProcessType );
164
-
165
- if (process_type != switches::kZygoteProcess )
166
- InitCrashReporter ();
167
167
}
168
168
169
169
int ShellMainDelegate::RunProcess (
You can’t perform that action at this time.
0 commit comments