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

Unified Diff: chrome/browser/process_singleton.h

Issue 2880333004: Fix not deleting a lockfile or not killing a frozen browser on hostname change (Closed)
Patch Set: Renamed KillProcessByLockPath() parameter to is_connected_to_socket Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/process_singleton_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/process_singleton.h
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 3d126cd9902ae6b900837ed824b5b434277fe24d..d11ab2ad4c620300dceaf098048b9ffbdf4d907f 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_to_socket 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_to_socket 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_to_socket);
// Default function to kill a process, overridable by tests.
void KillProcess(int pid);
« no previous file with comments | « no previous file | chrome/browser/process_singleton_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698