| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" | 5 #include "chromecast/browser/cast_content_browser_client.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 void CastContentBrowserClient::AppendExtraCommandLineSwitches( | 125 void CastContentBrowserClient::AppendExtraCommandLineSwitches( |
| 126 base::CommandLine* command_line, | 126 base::CommandLine* command_line, |
| 127 int child_process_id) { | 127 int child_process_id) { |
| 128 | 128 |
| 129 std::string process_type = | 129 std::string process_type = |
| 130 command_line->GetSwitchValueNative(switches::kProcessType); | 130 command_line->GetSwitchValueNative(switches::kProcessType); |
| 131 base::CommandLine* browser_command_line = | 131 base::CommandLine* browser_command_line = |
| 132 base::CommandLine::ForCurrentProcess(); | 132 base::CommandLine::ForCurrentProcess(); |
| 133 | 133 |
| 134 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) |
| 135 if (process_type != switches::kZygoteProcess) { |
| 136 command_line->AppendSwitch(::switches::kV8NativesPassedByFD); |
| 137 command_line->AppendSwitch(::switches::kV8SnapshotPassedByFD); |
| 138 } |
| 139 #endif // V8_USE_EXTERNAL_STARTUP_DATA |
| 140 |
| 134 // IsCrashReporterEnabled() is set when InitCrashReporter() is called, and | 141 // IsCrashReporterEnabled() is set when InitCrashReporter() is called, and |
| 135 // controlled by GetBreakpadClient()->EnableBreakpadForProcess(), therefore | 142 // controlled by GetBreakpadClient()->EnableBreakpadForProcess(), therefore |
| 136 // it's ok to add switch to every process here. | 143 // it's ok to add switch to every process here. |
| 137 if (breakpad::IsCrashReporterEnabled()) { | 144 if (breakpad::IsCrashReporterEnabled()) { |
| 138 command_line->AppendSwitch(switches::kEnableCrashReporter); | 145 command_line->AppendSwitch(switches::kEnableCrashReporter); |
| 139 } | 146 } |
| 140 | 147 |
| 141 // Renderer process command-line | 148 // Renderer process command-line |
| 142 if (process_type == switches::kRendererProcess) { | 149 if (process_type == switches::kRendererProcess) { |
| 143 // Any browser command-line switches that should be propagated to | 150 // Any browser command-line switches that should be propagated to |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 process_type, dumps_path, false /* upload */); | 389 process_type, dumps_path, false /* upload */); |
| 383 // StartUploaderThread() even though upload is diferred. | 390 // StartUploaderThread() even though upload is diferred. |
| 384 // Breakpad-related memory is freed in the uploader thread. | 391 // Breakpad-related memory is freed in the uploader thread. |
| 385 crash_handler->StartUploaderThread(); | 392 crash_handler->StartUploaderThread(); |
| 386 return crash_handler; | 393 return crash_handler; |
| 387 } | 394 } |
| 388 #endif // !defined(OS_ANDROID) | 395 #endif // !defined(OS_ANDROID) |
| 389 | 396 |
| 390 } // namespace shell | 397 } // namespace shell |
| 391 } // namespace chromecast | 398 } // namespace chromecast |
| OLD | NEW |