| Index: chrome/app/chrome_dll_main.cc
|
| ===================================================================
|
| --- chrome/app/chrome_dll_main.cc (revision 10695)
|
| +++ chrome/app/chrome_dll_main.cc (working copy)
|
| @@ -266,6 +266,18 @@
|
| return 1;
|
| #endif
|
|
|
| + int browser_pid;
|
| + std::wstring process_type =
|
| + parsed_command_line.GetSwitchValue(switches::kProcessType);
|
| + if (process_type.empty()) {
|
| + browser_pid = base::GetCurrentProcId();
|
| + } else {
|
| + std::wstring channel_name =
|
| + parsed_command_line.GetSwitchValue(switches::kProcessChannelID);
|
| +
|
| + browser_pid = _wtoi(channel_name.c_str());
|
| + DCHECK(browser_pid != 0);
|
| + }
|
| SetupCRT(parsed_command_line);
|
|
|
| // Initialize the Chrome path provider.
|
| @@ -279,7 +291,7 @@
|
| // TODO(port): we probably need to shut this down correctly to avoid
|
| // leaking shared memory regions on posix platforms.
|
| std::string statsfile = chrome::kStatsFilename;
|
| - std::string pid_string = StringPrintf("-%d", base::GetCurrentProcId());
|
| + std::string pid_string = StringPrintf("-%d", browser_pid);
|
| statsfile += pid_string;
|
| StatsTable *stats_table = new StatsTable(statsfile,
|
| chrome::kStatsMaxThreads, chrome::kStatsMaxCounters);
|
| @@ -295,9 +307,6 @@
|
| if (parsed_command_line.HasSwitch(switches::kMessageLoopHistogrammer))
|
| MessageLoop::EnableHistogrammer(true);
|
|
|
| - std::wstring process_type =
|
| - parsed_command_line.GetSwitchValue(switches::kProcessType);
|
| -
|
| // Checks if the sandbox is enabled in this process and initializes it if this
|
| // is the case. The crash handler depends on this so it has to be done before
|
| // its initialization.
|
|
|