| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 426   channel_ = | 426   channel_ = | 
| 427       IPC::SyncChannel::Create(this, ChildProcess::current()->io_task_runner(), | 427       IPC::SyncChannel::Create(this, ChildProcess::current()->io_task_runner(), | 
| 428                                ChildProcess::current()->GetShutDownEvent()); | 428                                ChildProcess::current()->GetShutDownEvent()); | 
| 429 #ifdef IPC_MESSAGE_LOG_ENABLED | 429 #ifdef IPC_MESSAGE_LOG_ENABLED | 
| 430   if (!IsInBrowserProcess()) | 430   if (!IsInBrowserProcess()) | 
| 431     IPC::Logging::GetInstance()->SetIPCSender(this); | 431     IPC::Logging::GetInstance()->SetIPCSender(this); | 
| 432 #endif | 432 #endif | 
| 433 | 433 | 
| 434   if (!IsInBrowserProcess()) { | 434   if (!IsInBrowserProcess()) { | 
| 435     // Don't double-initialize IPC support in single-process mode. | 435     // Don't double-initialize IPC support in single-process mode. | 
| 436     mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport(GetIOTaskRunner())); | 436     mojo_ipc_support_.reset(new mojo::edk::ScopedIPCSupport( | 
|  | 437         GetIOTaskRunner(), mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST)); | 
| 437     InitializeMojoIPCChannel(); | 438     InitializeMojoIPCChannel(); | 
| 438   } | 439   } | 
| 439   std::string service_request_token; | 440   std::string service_request_token; | 
| 440   if (!IsInBrowserProcess()) { | 441   if (!IsInBrowserProcess()) { | 
| 441     service_request_token = | 442     service_request_token = | 
| 442       base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 443       base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 
| 443         switches::kServiceRequestChannelToken); | 444         switches::kServiceRequestChannelToken); | 
| 444   } else { | 445   } else { | 
| 445     service_request_token = options.in_process_service_request_token; | 446     service_request_token = options.in_process_service_request_token; | 
| 446   } | 447   } | 
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 874   connected_to_browser_ = true; | 875   connected_to_browser_ = true; | 
| 875   child_info_ = local_info; | 876   child_info_ = local_info; | 
| 876   browser_info_ = remote_info; | 877   browser_info_ = remote_info; | 
| 877 } | 878 } | 
| 878 | 879 | 
| 879 bool ChildThreadImpl::IsInBrowserProcess() const { | 880 bool ChildThreadImpl::IsInBrowserProcess() const { | 
| 880   return static_cast<bool>(browser_process_io_runner_); | 881   return static_cast<bool>(browser_process_io_runner_); | 
| 881 } | 882 } | 
| 882 | 883 | 
| 883 }  // namespace content | 884 }  // namespace content | 
| OLD | NEW | 
|---|