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

Side by Side Diff: base/process/kill.h

Issue 2172013002: Wire up OOM exception to the sad tab page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@memory2
Patch Set: increment outside macro Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/process/kill_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains routines to kill processes and get the exit code and 5 // This file contains routines to kill processes and get the exit code and
6 // termination status. 6 // termination status.
7 7
8 #ifndef BASE_PROCESS_KILL_H_ 8 #ifndef BASE_PROCESS_KILL_H_
9 #define BASE_PROCESS_KILL_H_ 9 #define BASE_PROCESS_KILL_H_
10 10
(...skipping 21 matching lines...) Expand all
32 TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM, 32 TERMINATION_STATUS_PROCESS_WAS_KILLED_BY_OOM,
33 #endif 33 #endif
34 #if defined(OS_ANDROID) 34 #if defined(OS_ANDROID)
35 // On Android processes are spawned from the system Zygote and we do not get 35 // On Android processes are spawned from the system Zygote and we do not get
36 // the termination status. We can't know if the termination was a crash or an 36 // the termination status. We can't know if the termination was a crash or an
37 // oom kill for sure, but we can use status of the strong process bindings as 37 // oom kill for sure, but we can use status of the strong process bindings as
38 // a hint. 38 // a hint.
39 TERMINATION_STATUS_OOM_PROTECTED, // child was protected from oom kill 39 TERMINATION_STATUS_OOM_PROTECTED, // child was protected from oom kill
40 #endif 40 #endif
41 TERMINATION_STATUS_LAUNCH_FAILED, // child process never launched 41 TERMINATION_STATUS_LAUNCH_FAILED, // child process never launched
42 TERMINATION_STATUS_OOM, // Process died due to oom
42 TERMINATION_STATUS_MAX_ENUM 43 TERMINATION_STATUS_MAX_ENUM
43 }; 44 };
44 45
45 // Attempts to kill all the processes on the current machine that were launched 46 // Attempts to kill all the processes on the current machine that were launched
46 // from the given executable name, ending them with the given exit code. If 47 // from the given executable name, ending them with the given exit code. If
47 // filter is non-null, then only processes selected by the filter are killed. 48 // filter is non-null, then only processes selected by the filter are killed.
48 // Returns true if all processes were able to be killed off, false if at least 49 // Returns true if all processes were able to be killed off, false if at least
49 // one couldn't be killed. 50 // one couldn't be killed.
50 BASE_EXPORT bool KillProcesses(const FilePath::StringType& executable_name, 51 BASE_EXPORT bool KillProcesses(const FilePath::StringType& executable_name,
51 int exit_code, 52 int exit_code,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 #if defined(OS_POSIX) && !defined(OS_MACOSX) 128 #if defined(OS_POSIX) && !defined(OS_MACOSX)
128 // The nicer version of EnsureProcessTerminated() that is patient and will 129 // The nicer version of EnsureProcessTerminated() that is patient and will
129 // wait for |pid| to finish and then reap it. 130 // wait for |pid| to finish and then reap it.
130 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid); 131 BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid);
131 #endif 132 #endif
132 133
133 } // namespace base 134 } // namespace base
134 135
135 #endif // BASE_PROCESS_KILL_H_ 136 #endif // BASE_PROCESS_KILL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/kill_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698