Index: trunk/src/chrome/browser/process_singleton_linux.cc |
=================================================================== |
--- trunk/src/chrome/browser/process_singleton_linux.cc (revision 222182) |
+++ trunk/src/chrome/browser/process_singleton_linux.cc (working copy) |
@@ -294,28 +294,23 @@ |
return true; |
} |
-// Returns true if the user opted to unlock the profile. |
-bool DisplayProfileInUseError(const base::FilePath& lock_path, |
+void DisplayProfileInUseError(const std::string& lock_path, |
const std::string& hostname, |
int pid) { |
string16 error = l10n_util::GetStringFUTF16( |
IDS_PROFILE_IN_USE_LINUX, |
base::IntToString16(pid), |
ASCIIToUTF16(hostname), |
+ WideToUTF16(base::SysNativeMBToWide(lock_path)), |
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
- string16 relaunch_button_text = l10n_util::GetStringFUTF16( |
- IDS_PROFILE_IN_USE_LINUX_RELAUNCH, |
- string16()); |
LOG(ERROR) << base::SysWideToNativeMB(UTF16ToWide(error)).c_str(); |
if (!g_disable_prompt) { |
#if defined(TOOLKIT_GTK) |
- return ProcessSingletonDialog::ShowAndRun( |
- UTF16ToUTF8(error), UTF16ToUTF8(relaunch_button_text)); |
+ ProcessSingletonDialog::ShowAndRun(UTF16ToUTF8(error)); |
#else |
NOTIMPLEMENTED(); |
#endif |
} |
- return false; |
} |
bool IsChromeProcess(pid_t pid) { |
@@ -739,13 +734,9 @@ |
return PROCESS_NONE; |
} |
- if (hostname != net::GetHostName() && !IsChromeProcess(pid)) { |
- // Locked by process on another host. If the user selected to unlock |
- // the profile, try to continue; otherwise quit. |
- if (DisplayProfileInUseError(lock_path_, hostname, pid)) { |
- UnlinkPath(lock_path_); |
- return PROCESS_NONE; |
- } |
+ if (hostname != net::GetHostName()) { |
+ // Locked by process on another host. |
+ DisplayProfileInUseError(lock_path_.value(), hostname, pid); |
return PROFILE_IN_USE; |
} |
@@ -967,7 +958,8 @@ |
ParseLockPath(lock_path_, &hostname, &pid); |
if (!hostname.empty() && hostname != net::GetHostName()) { |
- return DisplayProfileInUseError(lock_path_, hostname, pid); |
+ DisplayProfileInUseError(lock_path_.value(), hostname, pid); |
+ return false; |
} |
UnlinkPath(lock_path_); |