• Home
  • Raw
  • Download

Lines Matching refs:base

69           base::StringPrintf("[%02X]", static_cast<unsigned char>(data[i])));  in LogBytes()
72 out->append(base::StringPrintf( in LogBytes()
79 bool ReadValue(const base::Pickle* m,
80 base::PickleIterator* iter,
81 std::unique_ptr<base::Value>* value,
84 void WriteValue(base::Pickle* m, const base::Value* value, int recursion) { in WriteValue()
94 case base::Value::Type::NONE: in WriteValue()
96 case base::Value::Type::BOOLEAN: { in WriteValue()
103 case base::Value::Type::INTEGER: { in WriteValue()
110 case base::Value::Type::DOUBLE: { in WriteValue()
117 case base::Value::Type::STRING: { in WriteValue()
124 case base::Value::Type::BINARY: { in WriteValue()
126 base::checked_cast<int>(value->GetBlob().size())); in WriteValue()
129 case base::Value::Type::DICTIONARY: { in WriteValue()
130 const base::DictionaryValue* dict = in WriteValue()
131 static_cast<const base::DictionaryValue*>(value); in WriteValue()
133 WriteParam(m, base::checked_cast<int>(dict->size())); in WriteValue()
135 for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); in WriteValue()
142 case base::Value::Type::LIST: { in WriteValue()
143 const base::ListValue* list = static_cast<const base::ListValue*>(value); in WriteValue()
144 WriteParam(m, base::checked_cast<int>(list->GetSize())); in WriteValue()
155 bool ReadDictionaryValue(const base::Pickle* m, in ReadDictionaryValue()
156 base::PickleIterator* iter, in ReadDictionaryValue()
157 base::DictionaryValue* value, in ReadDictionaryValue()
165 std::unique_ptr<base::Value> subval; in ReadDictionaryValue()
177 bool ReadListValue(const base::Pickle* m, in ReadListValue()
178 base::PickleIterator* iter, in ReadListValue()
179 base::ListValue* value, in ReadListValue()
186 std::unique_ptr<base::Value> subval; in ReadListValue()
195 bool ReadValue(const base::Pickle* m, in ReadValue()
196 base::PickleIterator* iter, in ReadValue()
197 std::unique_ptr<base::Value>* value, in ReadValue()
208 switch (static_cast<base::Value::Type>(type)) { in ReadValue()
209 case base::Value::Type::NONE: in ReadValue()
210 *value = std::make_unique<base::Value>(); in ReadValue()
212 case base::Value::Type::BOOLEAN: { in ReadValue()
216 *value = std::make_unique<base::Value>(val); in ReadValue()
219 case base::Value::Type::INTEGER: { in ReadValue()
223 *value = std::make_unique<base::Value>(val); in ReadValue()
226 case base::Value::Type::DOUBLE: { in ReadValue()
230 *value = std::make_unique<base::Value>(val); in ReadValue()
233 case base::Value::Type::STRING: { in ReadValue()
237 *value = std::make_unique<base::Value>(std::move(val)); in ReadValue()
240 case base::Value::Type::BINARY: { in ReadValue()
245 *value = base::Value::CreateWithCopiedBuffer(data, length); in ReadValue()
248 case base::Value::Type::DICTIONARY: { in ReadValue()
249 base::DictionaryValue val; in ReadValue()
252 *value = std::make_unique<base::Value>(std::move(val)); in ReadValue()
255 case base::Value::Type::LIST: { in ReadValue()
256 base::ListValue val; in ReadValue()
259 *value = std::make_unique<base::Value>(std::move(val)); in ReadValue()
289 void ParamTraits<signed char>::Write(base::Pickle* m, const param_type& p) { in Write()
293 bool ParamTraits<signed char>::Read(const base::Pickle* m, in Read()
294 base::PickleIterator* iter, in Read()
304 l->append(base::IntToString(p)); in Log()
307 void ParamTraits<unsigned char>::Write(base::Pickle* m, const param_type& p) { in Write()
311 bool ParamTraits<unsigned char>::Read(const base::Pickle* m, in Read()
312 base::PickleIterator* iter, in Read()
322 l->append(base::UintToString(p)); in Log()
325 void ParamTraits<unsigned short>::Write(base::Pickle* m, const param_type& p) { in Write()
329 bool ParamTraits<unsigned short>::Read(const base::Pickle* m, in Read()
330 base::PickleIterator* iter, in Read()
340 l->append(base::NumberToString(p)); in Log()
344 l->append(base::NumberToString(p)); in Log()
348 l->append(base::NumberToString(p)); in Log()
354 l->append(base::NumberToString(p)); in Log()
358 l->append(base::NumberToString(p)); in Log()
363 l->append(base::NumberToString(p)); in Log()
367 l->append(base::NumberToString(p)); in Log()
371 l->append(base::StringPrintf("%e", p)); in Log()
374 void ParamTraits<double>::Write(base::Pickle* m, const param_type& p) { in Write()
378 bool ParamTraits<double>::Read(const base::Pickle* m, in Read()
379 base::PickleIterator* iter, in Read()
391 l->append(base::StringPrintf("%e", p)); in Log()
399 void ParamTraits<base::string16>::Log(const param_type& p, std::string* l) { in Log()
400 l->append(base::UTF16ToUTF8(p)); in Log()
403 void ParamTraits<std::vector<char>>::Write(base::Pickle* m, in Write()
408 m->WriteData(&p.front(), base::checked_cast<int>(p.size())); in Write()
412 bool ParamTraits<std::vector<char>>::Read(const base::Pickle* m, in Read()
413 base::PickleIterator* iter, in Read()
429 void ParamTraits<std::vector<unsigned char>>::Write(base::Pickle* m, in Write()
435 base::checked_cast<int>(p.size())); in Write()
439 bool ParamTraits<std::vector<unsigned char>>::Read(const base::Pickle* m, in Read()
440 base::PickleIterator* iter, in Read()
457 void ParamTraits<std::vector<bool>>::Write(base::Pickle* m, in Write()
459 WriteParam(m, base::checked_cast<int>(p.size())); in Write()
467 bool ParamTraits<std::vector<bool>>::Read(const base::Pickle* m, in Read()
468 base::PickleIterator* iter, in Read()
492 void ParamTraits<base::DictionaryValue>::Write(base::Pickle* m, in Write()
497 bool ParamTraits<base::DictionaryValue>::Read(const base::Pickle* m, in Read()
498 base::PickleIterator* iter, in Read()
502 type != static_cast<int>(base::Value::Type::DICTIONARY)) in Read()
508 void ParamTraits<base::DictionaryValue>::Log(const param_type& p, in Log()
511 base::JSONWriter::Write(p, &json); in Log()
516 void ParamTraits<base::FileDescriptor>::Write(base::Pickle* m, in Write()
528 new internal::PlatformFileAttachment(base::ScopedFD(p.fd)))) in Write()
536 bool ParamTraits<base::FileDescriptor>::Read(const base::Pickle* m, in Read()
537 base::PickleIterator* iter, in Read()
539 *r = base::FileDescriptor(); in Read()
548 scoped_refptr<base::Pickle::Attachment> attachment; in Read()
557 *r = base::FileDescriptor( in Read()
564 void ParamTraits<base::FileDescriptor>::Log(const param_type& p, in Log()
567 l->append(base::StringPrintf("FD(%d auto-close)", p.fd)); in Log()
569 l->append(base::StringPrintf("FD(%d)", p.fd)); in Log()
575 void ParamTraits<AHardwareBuffer*>::Write(base::Pickle* m, in Write()
583 auto handle = base::android::ScopedHardwareBufferHandle::Adopt(p); in Write()
594 base::FileDescriptor(handle.SerializeAsFileDescriptor().release(), in Write()
602 bool ParamTraits<AHardwareBuffer*>::Read(const base::Pickle* m, in Read()
603 base::PickleIterator* iter, in Read()
613 scoped_refptr<base::Pickle::Attachment> tracking_pipe_attachment; in Read()
625 base::FileDescriptor descriptor; in Read()
631 base::ScopedFD scoped_fd(descriptor.fd); in Read()
635 *r = base::android::ScopedHardwareBufferHandle::DeserializeFromFileDescriptor( in Read()
642 l->append(base::StringPrintf("AHardwareBuffer(%p)", p)); in Log()
646 void ParamTraits<base::SharedMemoryHandle>::Write(base::Pickle* m, in Write()
679 base::ScopedFD(p.GetHandle())))) in Write()
700 bool ParamTraits<base::SharedMemoryHandle>::Read(const base::Pickle* m, in Read()
701 base::PickleIterator* iter, in Read()
703 *r = base::SharedMemoryHandle(); in Read()
729 scoped_refptr<base::Pickle::Attachment> attachment; in Read()
739 base::UnguessableToken guid; in Read()
742 !base::IsValueInRangeForNumericType<size_t>(size)) { in Read()
747 *r = base::SharedMemoryHandle(handle_win.get_handle(), in Read()
750 *r = base::SharedMemoryHandle(handle_fuchsia.get_handle(), in Read()
753 *r = base::SharedMemoryHandle(mach_port_mac.get_mach_port(), in Read()
756 *r = base::SharedMemoryHandle( in Read()
757 base::FileDescriptor( in Read()
772 void ParamTraits<base::SharedMemoryHandle>::Log(const param_type& p, in Log()
795 void ParamTraits<base::ReadOnlySharedMemoryRegion>::Write(base::Pickle* m, in Write()
797 base::subtle::PlatformSharedMemoryRegion handle = in Write()
798 base::ReadOnlySharedMemoryRegion::TakeHandleForSerialization( in Write()
803 bool ParamTraits<base::ReadOnlySharedMemoryRegion>::Read( in Read()
804 const base::Pickle* m, in Read()
805 base::PickleIterator* iter, in Read()
807 base::subtle::PlatformSharedMemoryRegion handle; in Read()
811 *r = base::ReadOnlySharedMemoryRegion::Deserialize(std::move(handle)); in Read()
815 void ParamTraits<base::ReadOnlySharedMemoryRegion>::Log(const param_type& p, in Log()
822 void ParamTraits<base::WritableSharedMemoryRegion>::Write(base::Pickle* m, in Write()
824 base::subtle::PlatformSharedMemoryRegion handle = in Write()
825 base::WritableSharedMemoryRegion::TakeHandleForSerialization( in Write()
830 bool ParamTraits<base::WritableSharedMemoryRegion>::Read( in Read()
831 const base::Pickle* m, in Read()
832 base::PickleIterator* iter, in Read()
834 base::subtle::PlatformSharedMemoryRegion handle; in Read()
838 *r = base::WritableSharedMemoryRegion::Deserialize(std::move(handle)); in Read()
842 void ParamTraits<base::WritableSharedMemoryRegion>::Log(const param_type& p, in Log()
849 void ParamTraits<base::UnsafeSharedMemoryRegion>::Write(base::Pickle* m, in Write()
851 base::subtle::PlatformSharedMemoryRegion handle = in Write()
852 base::UnsafeSharedMemoryRegion::TakeHandleForSerialization( in Write()
857 bool ParamTraits<base::UnsafeSharedMemoryRegion>::Read( in Read()
858 const base::Pickle* m, in Read()
859 base::PickleIterator* iter, in Read()
861 base::subtle::PlatformSharedMemoryRegion handle; in Read()
865 *r = base::UnsafeSharedMemoryRegion::Deserialize(std::move(handle)); in Read()
869 void ParamTraits<base::UnsafeSharedMemoryRegion>::Log(const param_type& p, in Log()
876 void ParamTraits<base::subtle::PlatformSharedMemoryRegion>::Write( in Write()
877 base::Pickle* m, in Write()
892 base::win::ScopedHandle h = const_cast<param_type&>(p).PassPlatformHandle(); in Write()
900 base::mac::ScopedMachSendRight h = in Write()
906 base::ScopedFD(const_cast<param_type&>(p).PassPlatformHandle()))); in Write()
908 base::subtle::ScopedFDPair h = in Write()
912 base::subtle::PlatformSharedMemoryRegion::Mode::kWritable) { in Write()
919 bool ParamTraits<base::subtle::PlatformSharedMemoryRegion>::Read( in Read()
920 const base::Pickle* m, in Read()
921 base::PickleIterator* iter, in Read()
927 *r = base::subtle::PlatformSharedMemoryRegion(); in Read()
931 base::subtle::PlatformSharedMemoryRegion::Mode mode; in Read()
933 base::UnguessableToken guid; in Read()
935 !base::IsValueInRangeForNumericType<size_t>(shm_size) || in Read()
945 *r = base::subtle::PlatformSharedMemoryRegion::Take( in Read()
946 base::win::ScopedHandle(handle_win.get_handle()), mode, size, guid); in Read()
951 *r = base::subtle::PlatformSharedMemoryRegion::Take( in Read()
957 *r = base::subtle::PlatformSharedMemoryRegion::Take( in Read()
958 base::mac::ScopedMachSendRight(mach_port_mac.get_mach_port()), mode, size, in Read()
961 scoped_refptr<base::Pickle::Attachment> attachment; in Read()
970 *r = base::subtle::PlatformSharedMemoryRegion::Take( in Read()
971 base::ScopedFD( in Read()
976 scoped_refptr<base::Pickle::Attachment> readonly_attachment; in Read()
977 if (mode == base::subtle::PlatformSharedMemoryRegion::Mode::kWritable) { in Read()
986 *r = base::subtle::PlatformSharedMemoryRegion::Take( in Read()
987 base::subtle::ScopedFDPair( in Read()
988 base::ScopedFD( in Read()
992 ? base::ScopedFD(static_cast<internal::PlatformFileAttachment*>( in Read()
995 : base::ScopedFD()), in Read()
1004 void ParamTraits<base::subtle::PlatformSharedMemoryRegion>::Log( in Log()
1017 base::subtle::FDPair h = p.GetPlatformHandle(); in Log()
1032 void ParamTraits<base::subtle::PlatformSharedMemoryRegion::Mode>::Write( in Write()
1033 base::Pickle* m, in Write()
1040 bool ParamTraits<base::subtle::PlatformSharedMemoryRegion::Mode>::Read( in Read()
1041 const base::Pickle* m, in Read()
1042 base::PickleIterator* iter, in Read()
1055 void ParamTraits<base::subtle::PlatformSharedMemoryRegion::Mode>::Log( in Log()
1062 void ParamTraits<PlatformFileForTransit>::Write(base::Pickle* m, in Write()
1072 bool ParamTraits<PlatformFileForTransit>::Read(const base::Pickle* m, in Read()
1073 base::PickleIterator* iter, in Read()
1096 void ParamTraits<base::FilePath>::Write(base::Pickle* m, const param_type& p) { in Write()
1100 bool ParamTraits<base::FilePath>::Read(const base::Pickle* m, in Read()
1101 base::PickleIterator* iter, in Read()
1106 void ParamTraits<base::FilePath>::Log(const param_type& p, std::string* l) { in Log()
1107 ParamTraits<base::FilePath::StringType>::Log(p.value(), l); in Log()
1110 void ParamTraits<base::ListValue>::Write(base::Pickle* m, const param_type& p) { in Write()
1114 bool ParamTraits<base::ListValue>::Read(const base::Pickle* m, in Read()
1115 base::PickleIterator* iter, in Read()
1119 type != static_cast<int>(base::Value::Type::LIST)) in Read()
1125 void ParamTraits<base::ListValue>::Log(const param_type& p, std::string* l) { in Log()
1127 base::JSONWriter::Write(p, &json); in Log()
1131 void ParamTraits<base::NullableString16>::Write(base::Pickle* m, in Write()
1137 bool ParamTraits<base::NullableString16>::Read(const base::Pickle* m, in Read()
1138 base::PickleIterator* iter, in Read()
1140 base::string16 string; in Read()
1146 *r = base::NullableString16(string, is_null); in Read()
1150 void ParamTraits<base::NullableString16>::Log(const param_type& p, in Log()
1159 void ParamTraits<base::File::Info>::Write(base::Pickle* m, in Write()
1168 bool ParamTraits<base::File::Info>::Read(const base::Pickle* m, in Read()
1169 base::PickleIterator* iter, in Read()
1178 p->last_modified = base::Time::FromDoubleT(last_modified); in Read()
1179 p->last_accessed = base::Time::FromDoubleT(last_accessed); in Read()
1180 p->creation_time = base::Time::FromDoubleT(creation_time); in Read()
1184 void ParamTraits<base::File::Info>::Log(const param_type& p, in Log()
1199 void ParamTraits<base::Time>::Write(base::Pickle* m, const param_type& p) { in Write()
1203 bool ParamTraits<base::Time>::Read(const base::Pickle* m, in Read()
1204 base::PickleIterator* iter, in Read()
1209 *r = base::Time::FromInternalValue(value); in Read()
1213 void ParamTraits<base::Time>::Log(const param_type& p, std::string* l) { in Log()
1217 void ParamTraits<base::TimeDelta>::Write(base::Pickle* m, const param_type& p) { in Write()
1221 bool ParamTraits<base::TimeDelta>::Read(const base::Pickle* m, in Read()
1222 base::PickleIterator* iter, in Read()
1227 *r = base::TimeDelta::FromInternalValue(value); in Read()
1232 void ParamTraits<base::TimeDelta>::Log(const param_type& p, std::string* l) { in Log()
1236 void ParamTraits<base::TimeTicks>::Write(base::Pickle* m, const param_type& p) { in Write()
1240 bool ParamTraits<base::TimeTicks>::Read(const base::Pickle* m, in Read()
1241 base::PickleIterator* iter, in Read()
1246 *r = base::TimeTicks::FromInternalValue(value); in Read()
1251 void ParamTraits<base::TimeTicks>::Log(const param_type& p, std::string* l) { in Log()
1257 static_assert(sizeof(base::UnguessableToken) == 2 * sizeof(uint64_t),
1260 void ParamTraits<base::UnguessableToken>::Write(base::Pickle* m, in Write()
1268 bool ParamTraits<base::UnguessableToken>::Read(const base::Pickle* m, in Read()
1269 base::PickleIterator* iter, in Read()
1280 *r = base::UnguessableToken::Deserialize(high, low); in Read()
1284 void ParamTraits<base::UnguessableToken>::Log(const param_type& p, in Log()
1289 void ParamTraits<IPC::ChannelHandle>::Write(base::Pickle* m, in Write()
1298 bool ParamTraits<IPC::ChannelHandle>::Read(const base::Pickle* m, in Read()
1299 base::PickleIterator* iter, in Read()
1312 ParamTraits<base::FileDescriptor>::Log(p.socket, l); in Log()
1319 void ParamTraits<LogData>::Write(base::Pickle* m, const param_type& p) { in Write()
1331 bool ParamTraits<LogData>::Read(const base::Pickle* m, in Read()
1332 base::PickleIterator* iter, in Read()
1350 void ParamTraits<Message>::Write(base::Pickle* m, const Message& p) { in Write()
1373 bool ParamTraits<Message>::Read(const base::Pickle* m, in Read()
1374 base::PickleIterator* iter, in Read()
1399 void ParamTraits<HANDLE>::Write(base::Pickle* m, const param_type& p) { in Write()
1403 bool ParamTraits<HANDLE>::Read(const base::Pickle* m, in Read()
1404 base::PickleIterator* iter, in Read()
1414 l->append(base::StringPrintf("0x%p", p)); in Log()
1417 void ParamTraits<MSG>::Write(base::Pickle* m, const param_type& p) { in Write()
1421 bool ParamTraits<MSG>::Read(const base::Pickle* m, in Read()
1422 base::PickleIterator* iter, in Read()