Chromium Code Reviews| Index: chrome/browser/process_singleton_win.cc |
| diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc |
| index 75918cd646d30acc63b9ec69397b038600f8caa0..453824d8ffff3ea2eafaef1bd38af5364dba6c33 100644 |
| --- a/chrome/browser/process_singleton_win.cc |
| +++ b/chrome/browser/process_singleton_win.cc |
| @@ -278,7 +278,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { |
| // Time to take action. Kill the browser process. |
| process.Terminate(content::RESULT_CODE_HUNG, true); |
| remote_window_ = NULL; |
| - return PROCESS_NONE; |
| + // GCOMANICI return PROCESS_HUNG; |
| + return PROCESS_HUNG; |
| } |
| ProcessSingleton::NotifyResult |
| @@ -286,9 +287,22 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { |
| ProcessSingleton::NotifyResult result = PROCESS_NONE; |
| if (!Create()) { |
| result = NotifyOtherProcess(); |
| + if (result == PROCESS_HUNG) { |
| + // The Chrome instance that usses the main profile directory was |
| + // detected to be hung and the user confirmed its termination. |
| + // Current process should have a secont attempt to create the profile |
| + if (!Create()) { |
|
grt (UTC plus 2)
2016/08/26 09:26:43
nit: omit braces for conditionals where the condit
gcomanici
2016/08/26 17:26:59
Acknowledged.
|
| + result = NotifyOtherProcess(); |
|
grt (UTC plus 2)
2016/08/26 09:26:43
instead of duplicating the calls to create and not
gcomanici
2016/08/26 17:26:59
Done.
|
| + } |
| + } |
| if (result == PROCESS_NONE) |
| result = PROFILE_IN_USE; |
| - } else { |
| + if (result == PROCESS_HUNG) { |
| + // This only happens if the second attempt at Create() was succesful. |
| + result = PROCESS_NONE; |
| + } |
| + } |
| + if (result == PROCESS_NONE) { |
| g_browser_process->platform_part()->PlatformSpecificCommandLineProcessing( |
|
grt (UTC plus 2)
2016/08/26 09:26:43
looking at the design in here a bit more, it seems
gcomanici
2016/08/26 17:26:59
The new patch has this call in chrome_browser_main
|
| *base::CommandLine::ForCurrentProcess()); |
| } |