| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 void ArcCrashCollectorBridge::OnInstanceReady() { | 64 void ArcCrashCollectorBridge::OnInstanceReady() { |
| 65 mojom::CrashCollectorHostPtr host_ptr; | 65 mojom::CrashCollectorHostPtr host_ptr; |
| 66 binding_.Bind(mojo::GetProxy(&host_ptr)); | 66 binding_.Bind(mojo::GetProxy(&host_ptr)); |
| 67 auto* instance = | 67 auto* instance = |
| 68 arc_bridge_service()->crash_collector()->GetInstanceForMethod("Init"); | 68 arc_bridge_service()->crash_collector()->GetInstanceForMethod("Init"); |
| 69 DCHECK(instance); | 69 DCHECK(instance); |
| 70 instance->Init(std::move(host_ptr)); | 70 instance->Init(std::move(host_ptr)); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void ArcCrashCollectorBridge::DumpCrash(const mojo::String& type, | 73 void ArcCrashCollectorBridge::DumpCrash(const std::string& type, |
| 74 mojo::ScopedHandle pipe) { | 74 mojo::ScopedHandle pipe) { |
| 75 mojo::edk::ScopedPlatformHandle pipe_handle; | 75 mojo::edk::ScopedPlatformHandle pipe_handle; |
| 76 mojo::edk::PassWrappedPlatformHandle(pipe.release().value(), &pipe_handle); | 76 mojo::edk::PassWrappedPlatformHandle(pipe.release().value(), &pipe_handle); |
| 77 | 77 |
| 78 blocking_task_runner_->PostTask( | 78 blocking_task_runner_->PostTask( |
| 79 FROM_HERE, base::Bind(&RunCrashReporter, type, device_, board_, cpu_abi_, | 79 FROM_HERE, base::Bind(&RunCrashReporter, type, device_, board_, cpu_abi_, |
| 80 base::Passed(std::move(pipe_handle)))); | 80 base::Passed(std::move(pipe_handle)))); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void ArcCrashCollectorBridge::SetBuildProperties(const mojo::String& device, | 83 void ArcCrashCollectorBridge::SetBuildProperties(const std::string& device, |
| 84 const mojo::String& board, | 84 const std::string& board, |
| 85 const mojo::String& cpu_abi) { | 85 const std::string& cpu_abi) { |
| 86 device_ = device.get(); | 86 device_ = device; |
| 87 board_ = board.get(); | 87 board_ = board; |
| 88 cpu_abi_ = cpu_abi.get(); | 88 cpu_abi_ = cpu_abi; |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace arc | 91 } // namespace arc |
| OLD | NEW |