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

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

Issue 137273003: Mojo: Rename PlatformChannelHandle to PlatformHandle, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 11 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 | « mojo/common/test/multiprocess_test_base.h ('k') | mojo/common/test/multiprocess_test_base_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1ff9d951edc6e6bbf1a90a957d2b0efe4b26b35a..9a1b8b39382f057474ae27dc55669cd451a7073e 100644
--- a/mojo/common/test/multiprocess_test_base.cc
+++ b/mojo/common/test/multiprocess_test_base.cc
@@ -10,7 +10,6 @@
#include "base/process/process_handle.h"
// TODO(vtl): Remove build_config.h include when fully implemented on Windows.
#include "build/build_config.h"
-#include "mojo/system/platform_channel.h"
#include "mojo/system/platform_channel_pair.h"
namespace mojo {
@@ -32,14 +31,14 @@ void MultiprocessTestBase::SetUp() {
// TODO(vtl): Not implemented on Windows yet.
#if defined(OS_POSIX)
platform_channel_pair_.reset(new system::PlatformChannelPair());
- server_platform_channel = platform_channel_pair_->CreateServerChannel();
+ server_platform_handle = platform_channel_pair_->PassServerHandle();
#endif
}
void MultiprocessTestBase::TearDown() {
CHECK_EQ(test_child_handle_, base::kNullProcessHandle);
- server_platform_channel.reset();
+ server_platform_handle.reset();
platform_channel_pair_.reset();
MultiProcessTest::TearDown();
@@ -55,8 +54,8 @@ void MultiprocessTestBase::StartChild(const std::string& test_child_name) {
#if defined(OS_POSIX)
CommandLine unused(CommandLine::NO_PROGRAM);
base::FileHandleMappingVector fds_to_map;
- platform_channel_pair_->PrepareToPassClientChannelToChildProcess(&unused,
- &fds_to_map);
+ platform_channel_pair_->PrepareToPassClientHandleToChildProcess(&unused,
+ &fds_to_map);
test_child_handle_ = SpawnChild(test_child_main, fds_to_map, false);
#elif defined(OS_WIN)
test_child_handle_ = SpawnChild(test_child_main, false);
@@ -92,8 +91,8 @@ CommandLine MultiprocessTestBase::MakeCmdLine(const std::string& procname,
// TODO(vtl): Not implemented on Windows yet.
#if defined(OS_POSIX)
base::FileHandleMappingVector unused;
- platform_channel_pair_->PrepareToPassClientChannelToChildProcess(
- &command_line, &unused);
+ platform_channel_pair_->PrepareToPassClientHandleToChildProcess(&command_line,
+ &unused);
#endif
return command_line;
}
@@ -103,16 +102,14 @@ void MultiprocessTestBase::ChildSetup() {
CHECK(CommandLine::InitializedForCurrentProcess());
// TODO(vtl): Not implemented on Windows yet.
#if defined(OS_POSIX)
- client_platform_channel =
- system::PlatformChannelPair::CreateClientChannelFromParentProcess(
+ client_platform_handle =
+ system::PlatformChannelPair::PassClientHandleFromParentProcess(
*CommandLine::ForCurrentProcess());
- CHECK(client_platform_channel.get());
#endif
}
// static
-scoped_ptr<system::PlatformChannel>
- MultiprocessTestBase::client_platform_channel;
+system::ScopedPlatformHandle MultiprocessTestBase::client_platform_handle;
} // namespace test
} // namespace mojo
« no previous file with comments | « mojo/common/test/multiprocess_test_base.h ('k') | mojo/common/test/multiprocess_test_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698