| 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 "chrome/browser/service_process/service_process_control.h" | 5 #include "chrome/browser/service_process/service_process_control.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 if (channel_.get()) { | 66 if (channel_.get()) { |
| 67 RunConnectDoneTasks(); | 67 RunConnectDoneTasks(); |
| 68 return; | 68 return; |
| 69 } | 69 } |
| 70 | 70 |
| 71 // Actually going to connect. | 71 // Actually going to connect. |
| 72 DVLOG(1) << "Connecting to Service Process IPC Server"; | 72 DVLOG(1) << "Connecting to Service Process IPC Server"; |
| 73 | 73 |
| 74 mojo::MessagePipe pipe; | 74 mojo::MessagePipe pipe; |
| 75 base::PostTaskWithTraits( | 75 base::PostTaskWithTraits( |
| 76 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( | 76 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
| 77 base::TaskPriority::BACKGROUND), | |
| 78 base::Bind(&ConnectAsync, base::Passed(&pipe.handle1), | 77 base::Bind(&ConnectAsync, base::Passed(&pipe.handle1), |
| 79 GetServiceProcessChannel())); | 78 GetServiceProcessChannel())); |
| 80 // TODO(hclam): Handle error connecting to channel. | 79 // TODO(hclam): Handle error connecting to channel. |
| 81 auto io_task_runner = | 80 auto io_task_runner = |
| 82 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); | 81 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); |
| 83 SetChannel( | 82 SetChannel( |
| 84 IPC::ChannelProxy::Create(IPC::ChannelMojo::CreateClientFactory( | 83 IPC::ChannelProxy::Create(IPC::ChannelMojo::CreateClientFactory( |
| 85 std::move(pipe.handle0), io_task_runner), | 84 std::move(pipe.handle0), io_task_runner), |
| 86 this, io_task_runner)); | 85 this, io_task_runner)); |
| 87 } | 86 } |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 if (process_.IsValid()) { | 410 if (process_.IsValid()) { |
| 412 BrowserThread::PostTask( | 411 BrowserThread::PostTask( |
| 413 BrowserThread::IO, FROM_HERE, | 412 BrowserThread::IO, FROM_HERE, |
| 414 base::Bind(&Launcher::DoDetectLaunched, this)); | 413 base::Bind(&Launcher::DoDetectLaunched, this)); |
| 415 } else { | 414 } else { |
| 416 BrowserThread::PostTask( | 415 BrowserThread::PostTask( |
| 417 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); | 416 BrowserThread::UI, FROM_HERE, base::Bind(&Launcher::Notify, this)); |
| 418 } | 417 } |
| 419 } | 418 } |
| 420 #endif // !OS_MACOSX | 419 #endif // !OS_MACOSX |
| OLD | NEW |