Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: components/arc/crash_collector/arc_crash_collector_bridge.cc

Issue 2498683004: arc: Release ScopedHandle (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698