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

Unified Diff: net/test/test_server_win.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 | « chrome/test/ui/ui_test_suite.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/test/test_server_win.cc
diff --git a/net/test/test_server_win.cc b/net/test/test_server_win.cc
index ee62d1dfdc9af7502bb68843786d3d759b9d36e2..889180f1e4438e799d4a3d51a9066cbb2f0ce92e 100644
--- a/net/test/test_server_win.cc
+++ b/net/test/test_server_win.cc
@@ -13,6 +13,7 @@
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/path_service.h"
+#include "base/process_util.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/test/test_timeouts.h"
@@ -132,11 +133,7 @@ bool TestServer::LaunchPython(const FilePath& testserver_path) {
return false;
}
- JOBOBJECT_EXTENDED_LIMIT_INFORMATION limit_info = {0};
- limit_info.BasicLimitInformation.LimitFlags =
- JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
- if (0 == SetInformationJobObject(job_handle_.Get(),
- JobObjectExtendedLimitInformation, &limit_info, sizeof(limit_info))) {
+ if (!base::SetJobObjectAsKillOnJobClose(job_handle_.Get())) {
LOG(ERROR) << "Could not SetInformationJobObject.";
return false;
}
« no previous file with comments | « chrome/test/ui/ui_test_suite.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698