summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/generated_resources.grd4
-rw-r--r--chrome/browser/browser_main.cc8
2 files changed, 11 insertions, 1 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 0f39ed2..fcae759 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -4068,6 +4068,10 @@ each locale. -->
rgba($1, $2, $3, $4)
</message>
+ <message name="IDS_USED_EXISTING_BROWSER" desc="Linux-specific message printed to console when the app is ran a second time, causing a new window to show rather than starting up a new browser.">
+ Created new window in existing browser session.
+ </message>
+
</messages>
</release>
</grit>
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 15906f9..4b938c6 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -18,6 +18,7 @@
#include "base/process_util.h"
#include "base/string_piece.h"
#include "base/string_util.h"
+#include "base/sys_string_conversions.h"
#include "base/system_monitor.h"
#include "base/time.h"
#include "base/tracked_objects.h"
@@ -568,8 +569,13 @@ int BrowserMain(const MainFunctionParams& parameters) {
return FirstRun::ImportNow(profile, parsed_command_line);
// When another process is running, use it instead of starting us.
- if (process_singleton.NotifyOtherProcess())
+ if (process_singleton.NotifyOtherProcess()) {
+#if defined(OS_LINUX)
+ printf("%s\n", base::SysWideToNativeMB(
+ l10n_util::GetString(IDS_USED_EXISTING_BROWSER)).c_str());
+#endif
return ResultCodes::NORMAL_EXIT;
+ }
// Do the tasks if chrome has been upgraded while it was last running.
if (!already_running && DoUpgradeTasks(parsed_command_line)) {