OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chromeos/binder/transaction_data_from_driver.h" | 5 #include "chromeos/binder/transaction_data_from_driver.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include "base/bind.h" | 10 #include "base/bind.h" |
8 #include "base/location.h" | 11 #include "base/location.h" |
9 #include "base/logging.h" | 12 #include "base/logging.h" |
10 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
11 #include "base/thread_task_runner_handle.h" | 14 #include "base/thread_task_runner_handle.h" |
12 #include "chromeos/binder/command_stream.h" | 15 #include "chromeos/binder/command_stream.h" |
13 | 16 |
14 namespace binder { | 17 namespace binder { |
15 | 18 |
16 TransactionDataFromDriver::TransactionDataFromDriver( | 19 TransactionDataFromDriver::TransactionDataFromDriver( |
(...skipping 20 matching lines...) Expand all Loading... |
37 delete_task_runner_->PostTask(FROM_HERE, | 40 delete_task_runner_->PostTask(FROM_HERE, |
38 base::Bind(buffer_deleter_, GetData())); | 41 base::Bind(buffer_deleter_, GetData())); |
39 } | 42 } |
40 } | 43 } |
41 } | 44 } |
42 | 45 |
43 uintptr_t TransactionDataFromDriver::GetCookie() const { | 46 uintptr_t TransactionDataFromDriver::GetCookie() const { |
44 return data_.cookie; | 47 return data_.cookie; |
45 } | 48 } |
46 | 49 |
47 uint32 TransactionDataFromDriver::GetCode() const { | 50 uint32_t TransactionDataFromDriver::GetCode() const { |
48 return data_.code; | 51 return data_.code; |
49 } | 52 } |
50 | 53 |
51 pid_t TransactionDataFromDriver::GetSenderPID() const { | 54 pid_t TransactionDataFromDriver::GetSenderPID() const { |
52 return data_.sender_pid; | 55 return data_.sender_pid; |
53 } | 56 } |
54 | 57 |
55 uid_t TransactionDataFromDriver::GetSenderEUID() const { | 58 uid_t TransactionDataFromDriver::GetSenderEUID() const { |
56 return data_.sender_euid; | 59 return data_.sender_euid; |
57 } | 60 } |
(...skipping 22 matching lines...) Expand all Loading... |
80 const uintptr_t* TransactionDataFromDriver::GetObjectOffsets() const { | 83 const uintptr_t* TransactionDataFromDriver::GetObjectOffsets() const { |
81 return reinterpret_cast<const uintptr_t*>(data_.data.ptr.offsets); | 84 return reinterpret_cast<const uintptr_t*>(data_.data.ptr.offsets); |
82 } | 85 } |
83 | 86 |
84 size_t TransactionDataFromDriver::GetNumObjectOffsets() const { | 87 size_t TransactionDataFromDriver::GetNumObjectOffsets() const { |
85 DCHECK_EQ(0u, data_.offsets_size % sizeof(size_t)); | 88 DCHECK_EQ(0u, data_.offsets_size % sizeof(size_t)); |
86 return data_.offsets_size / sizeof(size_t); | 89 return data_.offsets_size / sizeof(size_t); |
87 } | 90 } |
88 | 91 |
89 } // namespace binder | 92 } // namespace binder |
OLD | NEW |