| Index: ipc/brokerable_attachment.cc
|
| diff --git a/ipc/brokerable_attachment.cc b/ipc/brokerable_attachment.cc
|
| index 96ce5bb6193861a7c100fee0e0fca4fcd6dabd5a..a0746e122b24f759618a0c154493ff7c4722584f 100644
|
| --- a/ipc/brokerable_attachment.cc
|
| +++ b/ipc/brokerable_attachment.cc
|
| @@ -7,52 +7,14 @@
|
| #include <stddef.h>
|
|
|
| #include "build/build_config.h"
|
| -#include "ipc/attachment_broker.h"
|
|
|
| namespace IPC {
|
|
|
| -// BrokerableAttachment::AttachmentId ------------------------------------------
|
| -#if !USE_ATTACHMENT_BROKER
|
| -// static
|
| -BrokerableAttachment::AttachmentId
|
| -BrokerableAttachment::AttachmentId::CreateIdWithRandomNonce() {
|
| - CHECK(false) << "Platforms that don't support attachment brokering shouldn't "
|
| - "be trying to generating a random nonce.";
|
| - return AttachmentId();
|
| -}
|
| -#endif
|
| -
|
| -BrokerableAttachment::AttachmentId::AttachmentId() {
|
| - for (size_t i = 0; i < BrokerableAttachment::kNonceSize; ++i)
|
| - nonce[i] = 0;
|
| -}
|
| -
|
| -BrokerableAttachment::AttachmentId::AttachmentId(const char* start_address,
|
| - size_t size) {
|
| - DCHECK(size == BrokerableAttachment::kNonceSize);
|
| - for (size_t i = 0; i < BrokerableAttachment::kNonceSize; ++i)
|
| - nonce[i] = start_address[i];
|
| -}
|
| -
|
| -void BrokerableAttachment::AttachmentId::SerializeToBuffer(char* start_address,
|
| - size_t size) {
|
| - DCHECK(size == BrokerableAttachment::kNonceSize);
|
| - for (size_t i = 0; i < BrokerableAttachment::kNonceSize; ++i)
|
| - start_address[i] = nonce[i];
|
| -}
|
| -
|
| // BrokerableAttachment::BrokerableAttachment ----------------------------------
|
|
|
| -BrokerableAttachment::BrokerableAttachment()
|
| - : id_(AttachmentId::CreateIdWithRandomNonce()) {}
|
| -
|
| -BrokerableAttachment::BrokerableAttachment(const AttachmentId& id) : id_(id) {}
|
| +BrokerableAttachment::BrokerableAttachment() = default;
|
|
|
| -BrokerableAttachment::~BrokerableAttachment() {}
|
| -
|
| -BrokerableAttachment::AttachmentId BrokerableAttachment::GetIdentifier() const {
|
| - return id_;
|
| -}
|
| +BrokerableAttachment::~BrokerableAttachment() = default;
|
|
|
| bool BrokerableAttachment::NeedsBrokering() const {
|
| return GetBrokerableType() == PLACEHOLDER;
|
|
|