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

Unified Diff: chrome/common/chrome_content_client.cc

Issue 8667006: Extract similar code into SetJobObjectAsKillOnJobClose() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 1 month 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 | « base/process_util_win.cc ('k') | chrome/test/base/layout_test_http_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_content_client.cc
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc
index 65b004b3ede042d7c5f9f3ceb30305b025eaa03f..9c8ca65be98732bf3f0059889000588817fa84ff 100644
--- a/chrome/common/chrome_content_client.cc
+++ b/chrome/common/chrome_content_client.cc
@@ -229,11 +229,7 @@ bool LoadFlashBroker(const FilePath& plugin_path, CommandLine* cmd_line) {
// terminates the job object is destroyed (by the OS) and the flash broker
// is terminated.
HANDLE job = ::CreateJobObjectW(NULL, NULL);
- JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_limits = {0};
- job_limits.BasicLimitInformation.LimitFlags =
- JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
- if (::SetInformationJobObject(job, JobObjectExtendedLimitInformation,
- &job_limits, sizeof(job_limits))) {
+ if (base::SetJobObjectAsKillOnJobClose(job)) {
::AssignProcessToJobObject(job, process);
// Yes, we are leaking the object here. Read comment above.
} else {
« no previous file with comments | « base/process_util_win.cc ('k') | chrome/test/base/layout_test_http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698