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

Side by Side Diff: remoting/host/remoting_me2me_host.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstdint> 9 #include <cstdint>
10 #include <memory> 10 #include <memory>
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 context_->ui_task_runner(); 463 context_->ui_task_runner();
464 task_runner->DeleteSoon(FROM_HERE, context_.release()); 464 task_runner->DeleteSoon(FROM_HERE, context_.release());
465 } 465 }
466 466
467 bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) { 467 bool HostProcess::InitWithCommandLine(const base::CommandLine* cmd_line) {
468 #if defined(REMOTING_MULTI_PROCESS) 468 #if defined(REMOTING_MULTI_PROCESS)
469 // Mojo keeps the task runner passed to it alive forever, so an 469 // Mojo keeps the task runner passed to it alive forever, so an
470 // AutoThreadTaskRunner should not be passed to it. Otherwise, the process may 470 // AutoThreadTaskRunner should not be passed to it. Otherwise, the process may
471 // never shut down cleanly. 471 // never shut down cleanly.
472 ipc_support_ = base::MakeUnique<mojo::edk::ScopedIPCSupport>( 472 ipc_support_ = base::MakeUnique<mojo::edk::ScopedIPCSupport>(
473 context_->network_task_runner()->task_runner()); 473 context_->network_task_runner()->task_runner(),
474 mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST);
474 mojo::edk::SetParentPipeHandle( 475 mojo::edk::SetParentPipeHandle(
475 mojo::edk::PlatformChannelPair::PassClientHandleFromParentProcess( 476 mojo::edk::PlatformChannelPair::PassClientHandleFromParentProcess(
476 *cmd_line)); 477 *cmd_line));
477 478
478 // Connect to the daemon process. 479 // Connect to the daemon process.
479 daemon_channel_ = IPC::ChannelProxy::Create( 480 daemon_channel_ = IPC::ChannelProxy::Create(
480 mojo::edk::CreateChildMessagePipe( 481 mojo::edk::CreateChildMessagePipe(
481 cmd_line->GetSwitchValueASCII(kMojoPipeToken)) 482 cmd_line->GetSwitchValueASCII(kMojoPipeToken))
482 .release(), 483 .release(),
483 IPC::Channel::MODE_CLIENT, this, context_->network_task_runner()); 484 IPC::Channel::MODE_CLIENT, this, context_->network_task_runner());
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds)); 1655 base::TimeDelta::FromSeconds(kShutdownTimeoutSeconds));
1655 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog); 1656 new HostProcess(std::move(context), &exit_code, &shutdown_watchdog);
1656 1657
1657 // Run the main (also UI) message loop until the host no longer needs it. 1658 // Run the main (also UI) message loop until the host no longer needs it.
1658 base::RunLoop().Run(); 1659 base::RunLoop().Run();
1659 1660
1660 return exit_code; 1661 return exit_code;
1661 } 1662 }
1662 1663
1663 } // namespace remoting 1664 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_process_main.cc ('k') | remoting/host/security_key/remote_security_key_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698