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

Unified Diff: chrome/app/chrome_main.cc

Issue 6364006: Fix StatsCounters on mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix signed/unsigned compare Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index 621350dd1842ee6d9f9ed81623b6f00a506f384e..edd4c0d0726f473312d86a8ebb9f41bd3d4b44c0 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -682,22 +682,23 @@ int ChromeMain(int argc, char** argv) {
base::ProcessId browser_pid = base::GetCurrentProcId();
if (SubprocessIsBrowserChild(process_type)) {
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(OS_MACOSX)
std::string channel_name =
command_line.GetSwitchValueASCII(switches::kProcessChannelID);
int browser_pid_int;
base::StringToInt(channel_name, &browser_pid_int);
browser_pid = static_cast<base::ProcessId>(browser_pid_int);
- DCHECK_NE(browser_pid, 0u);
-#elif defined(OS_MACOSX)
- browser_pid = base::GetCurrentProcId();
- SendTaskPortToParentProcess();
+ DCHECK_NE(browser_pid_int, 0);
#elif defined(OS_POSIX)
// On linux, we're in the zygote here; so we need the parent process' id.
browser_pid = base::GetParentProcessId(base::GetCurrentProcId());
#endif
+#if defined(OS_MACOSX)
+ SendTaskPortToParentProcess();
+#endif
+
#if defined(OS_POSIX)
// When you hit Ctrl-C in a terminal running the browser
// process, a SIGINT is delivered to the entire process group.
@@ -765,7 +766,6 @@ int ChromeMain(int argc, char** argv) {
}
}
-#if defined(OS_MACOSX)
// Mac Chrome is packaged with a main app bundle and a helper app bundle.
// The main app bundle should only be used for the browser process, so it
// should never see a --type switch (switches::kProcessType). Likewise,
@@ -783,11 +783,10 @@ int ChromeMain(int argc, char** argv) {
CHECK(!command_line.HasSwitch(switches::kProcessType))
<< "Main application forbids --type, saw \"" << process_type << "\".";
}
-#endif // defined(OS_MACOSX)
if (IsCrashReporterEnabled())
InitCrashProcessInfo();
-#endif // OS_MACOSX
+#endif // defined(OS_MACOSX)
InitializeStatsTable(browser_pid, command_line);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698