summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_dll_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r--chrome/app/chrome_dll_main.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 615507f..a0e1e8a 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -259,18 +259,6 @@ int ChromeMain(int argc, const char** argv) {
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.
@@ -284,7 +272,7 @@ int ChromeMain(int argc, const char** argv) {
// 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", browser_pid);
+ std::string pid_string = StringPrintf("-%d", base::GetCurrentProcId());
statsfile += pid_string;
StatsTable *stats_table = new StatsTable(statsfile,
chrome::kStatsMaxThreads, chrome::kStatsMaxCounters);
@@ -300,6 +288,9 @@ int ChromeMain(int argc, const char** argv) {
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.