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

Side by Side Diff: chromecast/browser/cast_content_browser_client.cc

Issue 1071173002: Use command line to signal whether a child process was passed V8 snapshot files via file descriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@v8_ext_cast
Patch Set: Created 5 years, 8 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
OLDNEW
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 void CastContentBrowserClient::AppendExtraCommandLineSwitches( 128 void CastContentBrowserClient::AppendExtraCommandLineSwitches(
129 base::CommandLine* command_line, 129 base::CommandLine* command_line,
130 int child_process_id) { 130 int child_process_id) {
131 131
132 std::string process_type = 132 std::string process_type =
133 command_line->GetSwitchValueNative(switches::kProcessType); 133 command_line->GetSwitchValueNative(switches::kProcessType);
134 base::CommandLine* browser_command_line = 134 base::CommandLine* browser_command_line =
135 base::CommandLine::ForCurrentProcess(); 135 base::CommandLine::ForCurrentProcess();
136 136
137 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
138 if (process_type != switches::kZygoteProcess) {
139 command_line->AppendSwitch(::switches::kV8NativesPassedByFD);
140 command_line->AppendSwitch(::switches::kV8SnapshotPassedByFD);
141 }
142 #endif // V8_USE_EXTERNAL_STARTUP_DATA
143
137 // IsCrashReporterEnabled() is set when InitCrashReporter() is called, and 144 // IsCrashReporterEnabled() is set when InitCrashReporter() is called, and
138 // controlled by GetBreakpadClient()->EnableBreakpadForProcess(), therefore 145 // controlled by GetBreakpadClient()->EnableBreakpadForProcess(), therefore
139 // it's ok to add switch to every process here. 146 // it's ok to add switch to every process here.
140 if (breakpad::IsCrashReporterEnabled()) { 147 if (breakpad::IsCrashReporterEnabled()) {
141 command_line->AppendSwitch(switches::kEnableCrashReporter); 148 command_line->AppendSwitch(switches::kEnableCrashReporter);
142 } 149 }
143 150
144 // Renderer process command-line 151 // Renderer process command-line
145 if (process_type == switches::kRendererProcess) { 152 if (process_type == switches::kRendererProcess) {
146 // Any browser command-line switches that should be propagated to 153 // Any browser command-line switches that should be propagated to
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 process_type, dumps_path, false /* upload */); 392 process_type, dumps_path, false /* upload */);
386 // StartUploaderThread() even though upload is diferred. 393 // StartUploaderThread() even though upload is diferred.
387 // Breakpad-related memory is freed in the uploader thread. 394 // Breakpad-related memory is freed in the uploader thread.
388 crash_handler->StartUploaderThread(); 395 crash_handler->StartUploaderThread();
389 return crash_handler; 396 return crash_handler;
390 } 397 }
391 #endif // !defined(OS_ANDROID) 398 #endif // !defined(OS_ANDROID)
392 399
393 } // namespace shell 400 } // namespace shell
394 } // namespace chromecast 401 } // namespace chromecast
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698