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

Unified Diff: chrome/browser/process_singleton_posix.cc

Issue 218883008: Use process_singleton_linux on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments (mostly) Created 6 years, 8 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
Index: chrome/browser/process_singleton_posix.cc
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_posix.cc
similarity index 99%
rename from chrome/browser/process_singleton_linux.cc
rename to chrome/browser/process_singleton_posix.cc
index 54d7db296f329d29016c8f5ba35d64bbefadd778..feab36f4b5fb57fcb7515084a32aec636686138a 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_posix.cc
@@ -74,7 +74,6 @@
#include "base/threading/platform_thread.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
-#include "chrome/browser/ui/process_singleton_dialog_linux.h"
#include "chrome/common/chrome_constants.h"
#include "content/public/browser/browser_thread.h"
#include "grit/chromium_strings.h"
@@ -82,6 +81,10 @@
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(OS_LINUX)
+#include "chrome/browser/ui/process_singleton_dialog_linux.h"
+#endif
+
#if defined(TOOLKIT_VIEWS) && !defined(OS_CHROMEOS)
#include "ui/views/linux_ui/linux_ui.h"
#endif
@@ -298,14 +301,17 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path,
const std::string& hostname,
int pid) {
base::string16 error = l10n_util::GetStringFUTF16(
- IDS_PROFILE_IN_USE_LINUX,
+ IDS_PROFILE_IN_USE_POSIX,
base::IntToString16(pid),
base::ASCIIToUTF16(hostname));
+ LOG(ERROR) << base::SysWideToNativeMB(base::UTF16ToWide(error)).c_str();
+ if (!g_disable_prompt) {
+#if defined(OS_LINUX)
base::string16 relaunch_button_text = l10n_util::GetStringUTF16(
IDS_PROFILE_IN_USE_LINUX_RELAUNCH);
- LOG(ERROR) << base::SysWideToNativeMB(base::UTF16ToWide(error)).c_str();
- if (!g_disable_prompt)
- return ShowProcessSingletonDialog(error, relaunch_button_text);
+ return ShowProcessSingletonDialog(error, relaunch_button_text);
+#endif
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698