| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } // namespace | 291 } // namespace |
| 292 | 292 |
| 293 ChildThread* ChildThread::Get() { | 293 ChildThread* ChildThread::Get() { |
| 294 return ChildThreadImpl::current(); | 294 return ChildThreadImpl::current(); |
| 295 } | 295 } |
| 296 | 296 |
| 297 ChildThreadImpl::Options::Options() | 297 ChildThreadImpl::Options::Options() |
| 298 : channel_name(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 298 : channel_name(base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 299 switches::kProcessChannelID)), | 299 switches::kProcessChannelID)), |
| 300 use_mojo_channel(base::CommandLine::ForCurrentProcess()->HasSwitch( | 300 use_mojo_channel(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 301 switches::kMojoChannelToken)), | 301 switches::kMojoApplicationChannelToken)), |
| 302 auto_start_mojo_shell_connection(true), | 302 auto_start_mojo_shell_connection(true), |
| 303 connect_to_browser(false) { | 303 connect_to_browser(false) { |
| 304 } | 304 } |
| 305 | 305 |
| 306 ChildThreadImpl::Options::Options(const Options& other) = default; | 306 ChildThreadImpl::Options::Options(const Options& other) = default; |
| 307 | 307 |
| 308 ChildThreadImpl::Options::~Options() { | 308 ChildThreadImpl::Options::~Options() { |
| 309 } | 309 } |
| 310 | 310 |
| 311 ChildThreadImpl::Options::Builder::Builder() { | 311 ChildThreadImpl::Options::Builder::Builder() { |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 void ChildThreadImpl::EnsureConnected() { | 853 void ChildThreadImpl::EnsureConnected() { |
| 854 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; | 854 VLOG(0) << "ChildThreadImpl::EnsureConnected()"; |
| 855 base::Process::Current().Terminate(0, false); | 855 base::Process::Current().Terminate(0, false); |
| 856 } | 856 } |
| 857 | 857 |
| 858 bool ChildThreadImpl::IsInBrowserProcess() const { | 858 bool ChildThreadImpl::IsInBrowserProcess() const { |
| 859 return static_cast<bool>(browser_process_io_runner_); | 859 return static_cast<bool>(browser_process_io_runner_); |
| 860 } | 860 } |
| 861 | 861 |
| 862 } // namespace content | 862 } // namespace content |
| OLD | NEW |