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

Unified Diff: mojo/common/test/multiprocess_test_base.cc

Issue 103113002: Mojo: (POSIX) Pass channel handle to child. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
Index: mojo/common/test/multiprocess_test_base.cc
diff --git a/mojo/common/test/multiprocess_test_base.cc b/mojo/common/test/multiprocess_test_base.cc
index 85aaa76514d23ccd6ced4e47b87e1664b8dfebb3..396272a4e49f3d3de42088c6b9a1e8edd89fb5fa 100644
--- a/mojo/common/test/multiprocess_test_base.cc
+++ b/mojo/common/test/multiprocess_test_base.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/process/kill.h"
#include "base/process/process_handle.h"
+// TODO(vtl): Remove build_config.h include when fully implemented on Windows.
#include "build/build_config.h"
namespace mojo {
@@ -96,9 +97,19 @@ CommandLine MultiprocessTestBase::MakeCmdLine(const std::string& procname,
// static
void MultiprocessTestBase::ChildSetup() {
- // TODO(vtl)
- NOTIMPLEMENTED();
+ CHECK(CommandLine::InitializedForCurrentProcess());
+// TODO(vtl): Not implemented on Windows yet.
+#if defined(OS_POSIX)
+ platform_client_channel =
+ system::PlatformClientChannel::CreateFromParentProcess(
+ *CommandLine::ForCurrentProcess());
+ CHECK(platform_client_channel.get());
+#endif
}
+// static
+scoped_ptr<system::PlatformClientChannel>
+ MultiprocessTestBase::platform_client_channel;
+
} // namespace test
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698