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

Unified Diff: ipc/brokerable_attachment.cc

Issue 2473993003: Delete IPC::ChannelPosix, IPC::ChannelWin and IPC::AttachmentBroker. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ipc/brokerable_attachment.h ('k') | ipc/brokerable_attachment_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « ipc/brokerable_attachment.h ('k') | ipc/brokerable_attachment_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698