| OLD | NEW |
| 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 #include "content/child/child_thread_impl.h" | 5 #include "content/child/child_thread_impl.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 } | 391 } |
| 392 | 392 |
| 393 if (!channel_token.empty()) { | 393 if (!channel_token.empty()) { |
| 394 // TODO(rockot): Remove all paths which lead to this branch. The Channel | 394 // TODO(rockot): Remove all paths which lead to this branch. The Channel |
| 395 // connection should always be established by a service manager connection | 395 // connection should always be established by a service manager connection |
| 396 // from the browser. http://crbug.com/623396. | 396 // from the browser. http://crbug.com/623396. |
| 397 handle = mojo::edk::CreateChildMessagePipe(channel_token); | 397 handle = mojo::edk::CreateChildMessagePipe(channel_token); |
| 398 } else { | 398 } else { |
| 399 DCHECK(service_manager_connection_); | 399 DCHECK(service_manager_connection_); |
| 400 IPC::mojom::ChannelBootstrapPtr bootstrap; | 400 IPC::mojom::ChannelBootstrapPtr bootstrap; |
| 401 handle = mojo::GetProxy(&bootstrap).PassMessagePipe(); | 401 handle = mojo::MakeRequest(&bootstrap).PassMessagePipe(); |
| 402 service_manager_connection_->AddConnectionFilter( | 402 service_manager_connection_->AddConnectionFilter( |
| 403 base::MakeUnique<ChannelBootstrapFilter>(bootstrap.PassInterface())); | 403 base::MakeUnique<ChannelBootstrapFilter>(bootstrap.PassInterface())); |
| 404 } | 404 } |
| 405 | 405 |
| 406 DCHECK(handle.is_valid()); | 406 DCHECK(handle.is_valid()); |
| 407 channel_->Init( | 407 channel_->Init( |
| 408 IPC::ChannelMojo::CreateClientFactory( | 408 IPC::ChannelMojo::CreateClientFactory( |
| 409 std::move(handle), ChildProcess::current()->io_task_runner()), | 409 std::move(handle), ChildProcess::current()->io_task_runner()), |
| 410 true /* create_pipe_now */); | 410 true /* create_pipe_now */); |
| 411 } | 411 } |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 862 connected_to_browser_ = true; | 862 connected_to_browser_ = true; |
| 863 child_info_ = local_info; | 863 child_info_ = local_info; |
| 864 browser_info_ = remote_info; | 864 browser_info_ = remote_info; |
| 865 } | 865 } |
| 866 | 866 |
| 867 bool ChildThreadImpl::IsInBrowserProcess() const { | 867 bool ChildThreadImpl::IsInBrowserProcess() const { |
| 868 return static_cast<bool>(browser_process_io_runner_); | 868 return static_cast<bool>(browser_process_io_runner_); |
| 869 } | 869 } |
| 870 | 870 |
| 871 } // namespace content | 871 } // namespace content |
| OLD | NEW |