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

Unified Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 2360173002: Use ChannelMojo in ppapi_unittests. (Closed)
Patch Set: Created 4 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppapi_proxy_test.cc
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc
index 46d7a4ada77f4b615c6589ba70c3f1c8753ed003..ed70bb575b331bb8b080acf5770d6c74959f8406 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/ppapi/proxy/ppapi_proxy_test.cc
@@ -4,7 +4,6 @@
#include "ppapi/proxy/ppapi_proxy_test.h"
-#include <sstream>
#include <tuple>
#include "base/bind.h"
@@ -550,21 +549,19 @@ void TwoWayTest::SetUp() {
io_thread_.StartWithOptions(options);
plugin_thread_.Start();
- // Construct the IPC handle name using the process ID so we can safely run
- // multiple |TwoWayTest|s concurrently.
- std::ostringstream handle_name;
- handle_name << "TwoWayTestChannel" << base::GetCurrentProcId();
- IPC::ChannelHandle handle(handle_name.str());
+ IPC::ChannelHandle local_handle, remote_handle;
+ IPC::Channel::GenerateMojoChannelHandlePair("TwoWayTestChannel",
+ &local_handle, &remote_handle);
base::WaitableEvent remote_harness_set_up(
base::WaitableEvent::ResetPolicy::MANUAL,
base::WaitableEvent::InitialState::NOT_SIGNALED);
plugin_thread_.task_runner()->PostTask(
- FROM_HERE, base::Bind(&SetUpRemoteHarness, remote_harness_, handle,
+ FROM_HERE, base::Bind(&SetUpRemoteHarness, remote_harness_, remote_handle,
base::RetainedRef(io_thread_.task_runner()),
&shutdown_event_, &remote_harness_set_up));
remote_harness_set_up.Wait();
local_harness_->SetUpHarnessWithChannel(
- handle, io_thread_.task_runner().get(), &shutdown_event_,
+ local_handle, io_thread_.task_runner().get(), &shutdown_event_,
true); // is_client
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698