| 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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 } | 497 } |
| 498 | 498 |
| 499 #if defined(OS_POSIX) | 499 #if defined(OS_POSIX) |
| 500 // Check that --process-type is specified so we don't do this in unit tests | 500 // Check that --process-type is specified so we don't do this in unit tests |
| 501 // and single-process mode. | 501 // and single-process mode. |
| 502 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessType)) | 502 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kProcessType)) |
| 503 channel_->AddFilter(new SuicideOnChannelErrorFilter()); | 503 channel_->AddFilter(new SuicideOnChannelErrorFilter()); |
| 504 #endif | 504 #endif |
| 505 | 505 |
| 506 // Add filters passed here via options. | 506 // Add filters passed here via options. |
| 507 for (auto startup_filter : options.startup_filters) { | 507 for (auto* startup_filter : options.startup_filters) { |
| 508 channel_->AddFilter(startup_filter); | 508 channel_->AddFilter(startup_filter); |
| 509 } | 509 } |
| 510 | 510 |
| 511 IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal(); | 511 IPC::AttachmentBroker* broker = IPC::AttachmentBroker::GetGlobal(); |
| 512 if (broker && !broker->IsPrivilegedBroker()) | 512 if (broker && !broker->IsPrivilegedBroker()) |
| 513 broker->RegisterBrokerCommunicationChannel(channel_.get()); | 513 broker->RegisterBrokerCommunicationChannel(channel_.get()); |
| 514 ConnectChannel(options.use_mojo_channel, options.in_process_ipc_token); | 514 ConnectChannel(options.use_mojo_channel, options.in_process_ipc_token); |
| 515 | 515 |
| 516 int connection_timeout = kConnectionTimeoutS; | 516 int connection_timeout = kConnectionTimeoutS; |
| 517 std::string connection_override = | 517 std::string connection_override = |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 void ChildThreadImpl::EnsureConnected() { | 786 void ChildThreadImpl::EnsureConnected() { |
| 787 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; | 787 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; |
| 788 base::Process::Current().Terminate(0, false); | 788 base::Process::Current().Terminate(0, false); |
| 789 } | 789 } |
| 790 | 790 |
| 791 bool ChildThreadImpl::IsInBrowserProcess() const { | 791 bool ChildThreadImpl::IsInBrowserProcess() const { |
| 792 return static_cast<bool>(browser_process_io_runner_); | 792 return static_cast<bool>(browser_process_io_runner_); |
| 793 } | 793 } |
| 794 | 794 |
| 795 } // namespace content | 795 } // namespace content |
| OLD | NEW |