| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/arc/crash_collector/arc_crash_collector_bridge.h" | 5 #include "components/arc/crash_collector/arc_crash_collector_bridge.h" |
| 6 | 6 |
| 7 #include <sysexits.h> | 7 #include <sysexits.h> |
| 8 #include <unistd.h> | 8 #include <unistd.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 binding_.Bind(mojo::GetProxy(&host_ptr)); | 65 binding_.Bind(mojo::GetProxy(&host_ptr)); |
| 66 auto* instance = | 66 auto* instance = |
| 67 arc_bridge_service()->crash_collector()->GetInstanceForMethod("Init"); | 67 arc_bridge_service()->crash_collector()->GetInstanceForMethod("Init"); |
| 68 DCHECK(instance); | 68 DCHECK(instance); |
| 69 instance->Init(std::move(host_ptr)); | 69 instance->Init(std::move(host_ptr)); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void ArcCrashCollectorBridge::DumpCrash(const mojo::String& type, | 72 void ArcCrashCollectorBridge::DumpCrash(const mojo::String& type, |
| 73 mojo::ScopedHandle pipe) { | 73 mojo::ScopedHandle pipe) { |
| 74 mojo::edk::ScopedPlatformHandle pipe_handle; | 74 mojo::edk::ScopedPlatformHandle pipe_handle; |
| 75 mojo::edk::PassWrappedPlatformHandle(pipe.get().value(), &pipe_handle); | 75 mojo::edk::PassWrappedPlatformHandle(pipe.release().value(), &pipe_handle); |
| 76 | 76 |
| 77 blocking_task_runner_->PostTask( | 77 blocking_task_runner_->PostTask( |
| 78 FROM_HERE, base::Bind(&RunCrashReporter, type, device_, board_, cpu_abi_, | 78 FROM_HERE, base::Bind(&RunCrashReporter, type, device_, board_, cpu_abi_, |
| 79 base::Passed(std::move(pipe_handle)))); | 79 base::Passed(std::move(pipe_handle)))); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void ArcCrashCollectorBridge::SetBuildProperties(const mojo::String& device, | 82 void ArcCrashCollectorBridge::SetBuildProperties(const mojo::String& device, |
| 83 const mojo::String& board, | 83 const mojo::String& board, |
| 84 const mojo::String& cpu_abi) { | 84 const mojo::String& cpu_abi) { |
| 85 device_ = device.get(); | 85 device_ = device.get(); |
| 86 board_ = board.get(); | 86 board_ = board.get(); |
| 87 cpu_abi_ = cpu_abi.get(); | 87 cpu_abi_ = cpu_abi.get(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace arc | 90 } // namespace arc |
| OLD | NEW |