Chromium Code Reviews| Index: chrome/browser/process_singleton.h |
| diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h |
| index 3d126cd9902ae6b900837ed824b5b434277fe24d..4d2848642b2d310ec429bc0829a6a50c7399e682 100644 |
| --- a/chrome/browser/process_singleton.h |
| +++ b/chrome/browser/process_singleton.h |
| @@ -132,6 +132,7 @@ class ProcessSingleton : public base::NonThreadSafe { |
| #if defined(OS_POSIX) && !defined(OS_ANDROID) |
| static void DisablePromptForTesting(); |
| static void SkipIsChromeProcessCheckForTesting(bool skip); |
| + static void SetUserOptedUnlockInUseProfileForTesting(bool set_unlock); |
| #endif |
| #if defined(OS_WIN) |
| // Called to query whether to kill a hung browser process that has visible |
| @@ -184,11 +185,15 @@ class ProcessSingleton : public base::NonThreadSafe { |
| bool IsSameChromeInstance(pid_t pid); |
| // Extract the process's pid from a symbol link path and if it is on |
| - // the same host, kill the process, unlink the lock file and return true. |
| + // the same host or is_connected is true, kill the process, unlink the |
| + // lock file and return true. |
| // If the process is part of the same chrome instance, unlink the lock file |
| // and return true without killing it. |
| - // If the process is on a different host, return false. |
| - bool KillProcessByLockPath(); |
| + // If the process is on a different host and is_connected is false, |
| + // display profile in use error dialog (on Linux). If user opted to unlock |
| + // profile (on Mac OS X by default), unlink the lock file and return true. |
| + // Otherwise return false. |
| + bool KillProcessByLockPath(bool is_connected); |
|
Alexey Seren
2017/05/29 11:33:07
is_connected indicates whether we connected to soc
jochen (gone - plz use gerrit)
2017/06/06 15:00:44
can you rename the parameter to is_connect_to_sock
Alexey Seren
2017/06/06 16:33:38
Done. Renamed to is_connected_to_socket.
|
| // Default function to kill a process, overridable by tests. |
| void KillProcess(int pid); |