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

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: Fix compile on android 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 8038afe45e44da34a572e7532aa1565080819217..b68d25fafedf0e94df5240d8048db46d447377b7 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_GTK)
#include <gdk/gdk.h>
#endif
@@ -301,14 +304,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);
tapted 2014/04/08 17:56:44 Does this need an implementation on mac as well? I
jackhou1 2014/04/14 04:12:10 It's actually less common than what users get now.
mattm 2014/04/17 21:44:54 I'm not sure about osx, but linux doesn't normally
+#endif
+ }
return false;
}

Powered by Google App Engine
This is Rietveld 408576698