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

Unified Diff: chrome/app/chrome_dll_main.cc

Issue 300010: Cleanup: change PIDs to base::ProcessId (or pid_t) (Closed)
Patch Set: Print out PID as int64 in case ProcessId type ever grows. Created 11 years, 2 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 | « base/process_util_posix.cc ('k') | chrome/browser/memory_details.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_dll_main.cc
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index aa478b842448296bd24f281ad50c90ba4932cd04..f46ec701a92e260377fab5161b2062aa231f4f1c 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -375,7 +375,7 @@ int ChromeMain(int argc, char** argv) {
CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR);
#endif // OS_POSIX
- int browser_pid;
+ base::ProcessId browser_pid;
if (process_type.empty()) {
browser_pid = base::GetCurrentProcId();
} else {
@@ -383,7 +383,8 @@ int ChromeMain(int argc, char** argv) {
std::wstring channel_name =
parsed_command_line.GetSwitchValue(switches::kProcessChannelID);
- browser_pid = StringToInt(WideToASCII(channel_name));
+ browser_pid =
+ static_cast<base::ProcessId>(StringToInt(WideToASCII(channel_name)));
DCHECK(browser_pid != 0);
#else
browser_pid = base::GetCurrentProcId();
@@ -455,8 +456,8 @@ int ChromeMain(int argc, char** argv) {
// TODO(port): we probably need to shut this down correctly to avoid
// leaking shared memory regions on posix platforms.
if (parsed_command_line.HasSwitch(switches::kEnableStatsTable)) {
- std::string statsfile =
- StringPrintf("%s-%d", chrome::kStatsFilename, browser_pid);
+ std::string statsfile = StringPrintf("%s-%lld", chrome::kStatsFilename,
+ static_cast<int64>(browser_pid));
StatsTable *stats_table = new StatsTable(statsfile,
chrome::kStatsMaxThreads, chrome::kStatsMaxCounters);
StatsTable::set_current(stats_table);
« no previous file with comments | « base/process_util_posix.cc ('k') | chrome/browser/memory_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698