summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process.cc
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:47:53 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:47:53 +0000
commit5793fac1f201a4081f1d2c7fd5aadcf76837b3d1 (patch)
treead48804e83789a126a4dc8fd4b22256db10d2b94 /chrome/common/child_process.cc
parent0be8dd6707c9f02a089bf46c1fbfaa0131b42dc1 (diff)
downloadchromium_src-5793fac1f201a4081f1d2c7fd5aadcf76837b3d1.zip
chromium_src-5793fac1f201a4081f1d2c7fd5aadcf76837b3d1.tar.gz
chromium_src-5793fac1f201a4081f1d2c7fd5aadcf76837b3d1.tar.bz2
Set the title for wait-for-debugger dialog to be "Chromium". We were fetching the product name from resource bundle, which is not available for child processes that do not need it.
Review URL: http://codereview.chromium.org/3176008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process.cc')
-rw-r--r--chrome/common/child_process.cc49
1 files changed, 26 insertions, 23 deletions
diff --git a/chrome/common/child_process.cc b/chrome/common/child_process.cc
index e64f0f3..115308e 100644
--- a/chrome/common/child_process.cc
+++ b/chrome/common/child_process.cc
@@ -8,7 +8,6 @@
#include <signal.h> // For SigUSR1Handler below.
#endif
-#include "app/l10n_util.h"
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/string_number_conversions.h"
@@ -74,28 +73,32 @@ base::WaitableEvent* ChildProcess::GetShutDownEvent() {
void ChildProcess::WaitForDebugger(const std::wstring& label) {
#if defined(OS_WIN)
- std::wstring title = l10n_util::GetString(IDS_PRODUCT_NAME);
- std::wstring message = label;
- message += L" starting with pid: ";
- message += UTF8ToWide(base::IntToString(base::GetCurrentProcId()));
- title += L" ";
- title += label; // makes attaching to process easier
- ::MessageBox(NULL, message.c_str(), title.c_str(),
- MB_OK | MB_SETFOREGROUND);
+#if defined(GOOGLE_CHROME_BUILD)
+ std::wstring title = L"Google Chrome";
+#else // CHROMIUM_BUILD
+ std::wstring title = L"Chromium";
+#endif // CHROMIUM_BUILD
+ title += L" ";
+ title += label; // makes attaching to process easier
+ std::wstring message = label;
+ message += L" starting with pid: ";
+ message += UTF8ToWide(base::IntToString(base::GetCurrentProcId()));
+ ::MessageBox(NULL, message.c_str(), title.c_str(),
+ MB_OK | MB_SETFOREGROUND);
#elif defined(OS_POSIX)
- // TODO(playmobil): In the long term, overriding this flag doesn't seem
- // right, either use our own flag or open a dialog we can use.
- // This is just to ease debugging in the interim.
- LOG(WARNING) << label
- << " ("
- << getpid()
- << ") paused waiting for debugger to attach @ pid";
- // Install a signal handler so that pause can be woken.
- struct sigaction sa;
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = SigUSR1Handler;
- sigaction(SIGUSR1, &sa, NULL);
-
- pause();
+ // TODO(playmobil): In the long term, overriding this flag doesn't seem
+ // right, either use our own flag or open a dialog we can use.
+ // This is just to ease debugging in the interim.
+ LOG(WARNING) << label
+ << " ("
+ << getpid()
+ << ") paused waiting for debugger to attach @ pid";
+ // Install a signal handler so that pause can be woken.
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_handler = SigUSR1Handler;
+ sigaction(SIGUSR1, &sa, NULL);
+
+ pause();
#endif // defined(OS_POSIX)
}