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

Side by Side Diff: chrome/browser/chrome_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: Fix compile error 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 (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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 command_line->CopySwitchesFrom(browser_command_line, kChromeOSSwitches, 1196 command_line->CopySwitchesFrom(browser_command_line, kChromeOSSwitches,
1197 arraysize(kChromeOSSwitches)); 1197 arraysize(kChromeOSSwitches));
1198 1198
1199 // On Chrome OS need to pass primary user homedir (in multi-profiles session). 1199 // On Chrome OS need to pass primary user homedir (in multi-profiles session).
1200 base::FilePath homedir; 1200 base::FilePath homedir;
1201 PathService::Get(base::DIR_HOME, &homedir); 1201 PathService::Get(base::DIR_HOME, &homedir);
1202 command_line->AppendSwitchASCII(chromeos::switches::kHomedir, 1202 command_line->AppendSwitchASCII(chromeos::switches::kHomedir,
1203 homedir.value().c_str()); 1203 homedir.value().c_str());
1204 #endif 1204 #endif
1205 1205
1206 #if defined(OS_POSIX) && !defined(OS_MACOSX)
1207 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
1208 if (process_type != switches::kZygoteProcess) {
1209 command_line->AppendSwitch(::switches::kV8NativesPassedByFD);
1210 command_line->AppendSwitch(::switches::kV8SnapshotPassedByFD);
1211 }
1212 #endif // V8_USE_EXTERNAL_STARTUP_DATA
1213 #endif // OS_POSIX && !OS_MACOSX
1214
1206 if (process_type == switches::kRendererProcess) { 1215 if (process_type == switches::kRendererProcess) {
1207 content::RenderProcessHost* process = 1216 content::RenderProcessHost* process =
1208 content::RenderProcessHost::FromID(child_process_id); 1217 content::RenderProcessHost::FromID(child_process_id);
1209 Profile* profile = 1218 Profile* profile =
1210 process ? Profile::FromBrowserContext(process->GetBrowserContext()) 1219 process ? Profile::FromBrowserContext(process->GetBrowserContext())
1211 : NULL; 1220 : NULL;
1212 for (size_t i = 0; i < extra_parts_.size(); ++i) { 1221 for (size_t i = 0; i < extra_parts_.size(); ++i) {
1213 extra_parts_[i]->AppendExtraRendererCommandLineSwitches( 1222 extra_parts_[i]->AppendExtraRendererCommandLineSwitches(
1214 command_line, process, profile); 1223 command_line, process, profile);
1215 } 1224 }
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2406 switches::kDisableWebRtcEncryption, 2415 switches::kDisableWebRtcEncryption,
2407 }; 2416 };
2408 to_command_line->CopySwitchesFrom(from_command_line, 2417 to_command_line->CopySwitchesFrom(from_command_line,
2409 kWebRtcDevSwitchNames, 2418 kWebRtcDevSwitchNames,
2410 arraysize(kWebRtcDevSwitchNames)); 2419 arraysize(kWebRtcDevSwitchNames));
2411 } 2420 }
2412 } 2421 }
2413 #endif // defined(ENABLE_WEBRTC) 2422 #endif // defined(ENABLE_WEBRTC)
2414 2423
2415 } // namespace chrome 2424 } // namespace chrome
OLDNEW
« no previous file with comments | « ash/shell/content_client/shell_content_browser_client.cc ('k') | chromecast/browser/cast_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698