#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ipc/ipc_message.h"
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include "base/atomic_sequence_num.h"
#include "base/containers/span.h"
#include "base/logging.h"
#include "base/pickle.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "ipc/ipc_message_attachment.h"
#include "ipc/ipc_message_attachment_set.h"
#if BUILDFLAG(IS_POSIX)
#include "base/file_descriptor_posix.h"
#include "ipc/ipc_platform_file_attachment_posix.h"
#endif
namespace {
base::AtomicSequenceNumber g_ref_num;
inline uint32_t GetRefNumUpper24() { … }
}
namespace IPC {
Message::~Message() = default;
Message::Message() : … { … }
Message::Message(int32_t routing_id, uint32_t type, PriorityValue priority)
: … { … }
Message::Message(const char* data, size_t data_len)
: … { … }
Message::Message(const Message& other) : … { … }
void Message::Init() { … }
Message& Message::operator=(const Message& other) { … }
void Message::SetHeaderValues(int32_t routing, uint32_t type, uint32_t flags) { … }
void Message::EnsureMessageAttachmentSet() { … }
#if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
void Message::set_sent_time(int64_t time) { … }
int64_t Message::sent_time() const { … }
void Message::set_received_time(int64_t time) const { … }
#endif
Message::NextMessageInfo::NextMessageInfo()
: … { … }
Message::NextMessageInfo::~NextMessageInfo() = default;
void Message::FindNext(const char* range_start,
const char* range_end,
NextMessageInfo* info) { … }
bool Message::WriteAttachment(
scoped_refptr<base::Pickle::Attachment> attachment) { … }
bool Message::ReadAttachment(
base::PickleIterator* iter,
scoped_refptr<base::Pickle::Attachment>* attachment) const { … }
bool Message::HasAttachments() const { … }
}