Chromium Code Reviews| Index: chrome/browser/process_singleton.h |
| diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h |
| index 96a9bf65f42d2cfab301a10573b25739e7e05a4e..a13105ec36e43bde0b2f414ac8f4da09b9d687b6 100644 |
| --- a/chrome/browser/process_singleton.h |
| +++ b/chrome/browser/process_singleton.h |
| @@ -49,6 +49,42 @@ class CommandLine; |
| class ProcessSingleton : public base::NonThreadSafe { |
| public: |
| + // Used to send the reason of remote hang process termination as histogram. |
| + enum RemoteHungProcessTerminateReason { |
| +#if defined(OS_WIN) |
| + USER_ACCEPTED_TERMINATION = 1, |
| + NO_VISIBLE_WINDOW_FOUND = 2, |
| +#elif defined(OS_POSIX) |
| + NOTIFY_ATTEMPTS_EXCEEDED = 3, |
| + SOCKET_WRITE_FAILED = 4, |
| + SOCKET_READ_FAILED = 5, |
| +#endif |
| + REMOTE_HUNG_PROCESS_TERMINATE_REASON_COUNT = 6 |
| + }; |
| + |
| + // Used to send the result of interaction with remote process as histograms in |
| + // case when remote process influences on start. |
| + enum RemoteProcessInteractionResult { |
| + TERMINATE_SUCCEEDED = 0, |
| + TERMINATE_FAILED = 1, |
| + REMOTE_PROCESS_NOT_FOUND = 2, |
| +#if defined(OS_WIN) |
| + TERMINATE_WAIT_TIMEOUT = 3, |
| + RUNNING_PROCESS_NOTIFY_ERROR = 4, |
| +#elif defined(OS_POSIX) |
| + TERMINATE_NOT_ENOUGH_PERMISSIONS = 5, |
| + REMOTE_PROCESS_SHUTTING_DOWN = 6, |
| + PROFILE_UNLOCKED = 7, |
| + PROFILE_UNLOCKED_BEFORE_KILL = 8, |
| + SAME_BROWSER_INSTANCE = 9, |
| + SAME_BROWSER_INSTANCE_BEFORE_KILL = 10, |
| + FAILED_TO_EXTRACT_PID = 11, |
| + INVALID_LOCK_FILE = 12, |
| + ORPHANED_LOCK_FILE = 13, |
| +#endif |
| + REMOTE_PROCESS_INTERACTION_RESULT_COUNT = 14 |
|
gab
2017/05/15 16:58:39
Do not give an explicit number to the count, that
Alexey Seren
2017/05/15 19:20:25
I think that COUNT should have one value on each p
gab
2017/05/15 20:13:05
AFAIK, UMA doesn't process "count", it's only used
Alexey Seren
2017/05/16 05:30:38
Acknowledged.
Ok, you are right. Thank you for the
|
| + }; |
| + |
| // Logged as histograms, do not modify these values. |
| enum NotifyResult { |
| PROCESS_NONE = 0, |
| @@ -95,6 +131,7 @@ class ProcessSingleton : public base::NonThreadSafe { |
| #if defined(OS_POSIX) && !defined(OS_ANDROID) |
| static void DisablePromptForTesting(); |
| + static void SkipIsChromeProcessCheckForTesting(); |
| #endif |
| #if defined(OS_WIN) |
| // Called to query whether to kill a hung browser process that has visible |