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

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: Fix issue with hung browser after hostname change Created 3 years, 7 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') | chrome/browser/process_singleton_posix.cc » ('J')
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..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);
« no previous file with comments | « no previous file | chrome/browser/process_singleton_posix.cc » ('j') | chrome/browser/process_singleton_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698