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

Unified Diff: services/shell/tests/util.cc

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « services/shell/tests/util.h ('k') | services/tracing/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/tests/util.cc
diff --git a/services/shell/tests/util.cc b/services/shell/tests/util.cc
index bebda4eabc528b0ee455b63751a4d3f572c3be97..6449cc34c059175090e1d71abfe3fac64a6f8261 100644
--- a/services/shell/tests/util.cc
+++ b/services/shell/tests/util.cc
@@ -23,19 +23,21 @@
#include "services/shell/public/interfaces/shell_client_factory.mojom.h"
#include "services/shell/runner/common/switches.h"
-namespace mojo {
namespace shell {
namespace test {
+
namespace {
+
void QuitLoop(base::RunLoop* loop) {
loop->Quit();
}
+
} // namespace
-scoped_ptr<Connection> LaunchAndConnectToProcess(
+std::unique_ptr<Connection> LaunchAndConnectToProcess(
const std::string& target_exe_name,
const Identity target,
- mojo::Connector* connector,
+ shell::Connector* connector,
base::Process* process) {
base::FilePath target_path;
CHECK(base::PathService::Get(base::DIR_EXE, &target_path));
@@ -66,14 +68,14 @@ scoped_ptr<Connection> LaunchAndConnectToProcess(
mojo::ScopedMessagePipeHandle pipe =
mojo::edk::CreateParentMessagePipe(primordial_pipe_token);
- mojo::shell::mojom::ShellClientPtr client;
- client.Bind(mojo::InterfacePtrInfo<mojo::shell::mojom::ShellClient>(
- std::move(pipe), 0u));
- mojo::shell::mojom::PIDReceiverPtr receiver;
+ shell::mojom::ShellClientPtr client;
+ client.Bind(
+ mojo::InterfacePtrInfo<shell::mojom::ShellClient>(std::move(pipe), 0u));
+ shell::mojom::PIDReceiverPtr receiver;
- mojo::Connector::ConnectParams params(target);
+ shell::Connector::ConnectParams params(target);
params.set_client_process_connection(std::move(client), GetProxy(&receiver));
- scoped_ptr<mojo::Connection> connection = connector->Connect(&params);
+ std::unique_ptr<shell::Connection> connection = connector->Connect(&params);
{
base::RunLoop loop;
connection->AddConnectionCompletedClosure(base::Bind(&QuitLoop, &loop));
@@ -98,4 +100,3 @@ scoped_ptr<Connection> LaunchAndConnectToProcess(
} // namespace test
} // namespace shell
-} // namespace mojo
« no previous file with comments | « services/shell/tests/util.h ('k') | services/tracing/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698