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

Unified Diff: net/socket/ssl_test_util.h

Issue 2344001: Restricting lifetime of python sync server on Windows via a JobObject. (Closed)
Patch Set: Cleaning up more ^Ms I found in the file. Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/socket/ssl_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_test_util.h
diff --git a/net/socket/ssl_test_util.h b/net/socket/ssl_test_util.h
index 5a987aeb3d9ea47039af2e4dcfc63ebdc4a758d9..cc3e2cebdc500c581542ba38f55211b2093b73e1 100644
--- a/net/socket/ssl_test_util.h
+++ b/net/socket/ssl_test_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,6 +11,11 @@
#include "base/file_path.h"
#include "base/process_util.h"
+
+#if defined(OS_WIN)
+#include "base/scoped_handle_win.h"
+#endif
+
#if defined(USE_NSS)
#include "base/ref_counted.h"
#include "net/base/x509_certificate.h"
@@ -111,6 +116,11 @@ class TestServerLauncher {
base::ProcessHandle process_handle_;
+#if defined(OS_WIN)
+ // JobObject used to clean up orphaned child processes.
+ ScopedHandle job_handle_;
+#endif
+
// True if the server should handle each request in a separate process.
bool forking_;
@@ -125,6 +135,15 @@ class TestServerLauncher {
DISALLOW_COPY_AND_ASSIGN(TestServerLauncher);
};
-}
+#if defined(OS_WIN)
+// Launch test server as a job so that it is not orphaned if the test case is
+// abnormally terminated.
+bool LaunchTestServerAsJob(const std::wstring& cmdline,
+ bool start_hidden,
+ base::ProcessHandle* process_handle,
+ ScopedHandle* job_handle);
+#endif
+
+} // namespace net
#endif // NET_SOCKET_SSL_TEST_UTIL_H_
« no previous file with comments | « no previous file | net/socket/ssl_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698