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

Side by Side Diff: components/nacl/common/nacl_service.cc

Issue 2620633004: Remove mojo::edk::test::ScopedIPCSupport (Closed)
Patch Set: . Created 3 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 unified diff | Download patch
« no previous file with comments | « chrome/test/base/run_all_unittests.cc ('k') | content/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/nacl/common/nacl_service.h" 5 #include "components/nacl/common/nacl_service.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 registry->AddInterface(base::Bind(&ConnectBootstrapChannel, 94 registry->AddInterface(base::Bind(&ConnectBootstrapChannel,
95 base::Passed(&ipc_channel_bootstrap_))); 95 base::Passed(&ipc_channel_bootstrap_)));
96 return true; 96 return true;
97 } 97 }
98 98
99 } // namespace 99 } // namespace
100 100
101 std::unique_ptr<service_manager::ServiceContext> CreateNaClServiceContext( 101 std::unique_ptr<service_manager::ServiceContext> CreateNaClServiceContext(
102 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 102 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
103 mojo::ScopedMessagePipeHandle* ipc_channel) { 103 mojo::ScopedMessagePipeHandle* ipc_channel) {
104 auto ipc_support = 104 auto ipc_support = base::MakeUnique<mojo::edk::ScopedIPCSupport>(
105 base::MakeUnique<mojo::edk::ScopedIPCSupport>(std::move(io_task_runner)); 105 std::move(io_task_runner),
106 mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST);
106 EstablishMojoConnection(); 107 EstablishMojoConnection();
107 108
108 IPC::mojom::ChannelBootstrapPtr bootstrap; 109 IPC::mojom::ChannelBootstrapPtr bootstrap;
109 *ipc_channel = mojo::MakeRequest(&bootstrap).PassMessagePipe(); 110 *ipc_channel = mojo::MakeRequest(&bootstrap).PassMessagePipe();
110 return base::MakeUnique<service_manager::ServiceContext>( 111 return base::MakeUnique<service_manager::ServiceContext>(
111 base::MakeUnique<NaClService>(bootstrap.PassInterface(), 112 base::MakeUnique<NaClService>(bootstrap.PassInterface(),
112 std::move(ipc_support)), 113 std::move(ipc_support)),
113 ConnectToServiceManager()); 114 ConnectToServiceManager());
114 } 115 }
OLDNEW
« no previous file with comments | « chrome/test/base/run_all_unittests.cc ('k') | content/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698