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

Unified Diff: ipc/brokerable_attachment.h

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/attachment_broker_unprivileged_win.cc ('k') | ipc/brokerable_attachment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/brokerable_attachment.h
diff --git a/ipc/brokerable_attachment.h b/ipc/brokerable_attachment.h
index 50e7fd21eb954f4d18a57097b4f23213b7856bf2..a926d5bfe67089b3d98f262e44705283f3c71c01 100644
--- a/ipc/brokerable_attachment.h
+++ b/ipc/brokerable_attachment.h
@@ -21,44 +21,12 @@ namespace IPC {
// attached to a Chrome IPC message.
class IPC_EXPORT BrokerableAttachment : public MessageAttachment {
public:
- static const size_t kNonceSize = 16;
- // An id uniquely identifies an attachment sent via a broker.
- struct IPC_EXPORT AttachmentId {
- uint8_t nonce[kNonceSize];
-
- // Generates an AttachmentId with an unguessable, random nonce.
- static AttachmentId CreateIdWithRandomNonce();
-
- // Creates an AttachmentId with a zeroed nonce. This should only be used by
- // the IPC translation system, which requires that classes have a default
- // constructor.
- AttachmentId();
-
- // Constructs an AttachmentId from a buffer.
- AttachmentId(const char* start_address, size_t size);
-
- // Writes the nonce into a buffer.
- void SerializeToBuffer(char* start_address, size_t size);
-
- bool operator==(const AttachmentId& rhs) const {
- return std::equal(nonce, nonce + kNonceSize, rhs.nonce);
- }
-
- bool operator<(const AttachmentId& rhs) const {
- return std::lexicographical_compare(nonce, nonce + kNonceSize, rhs.nonce,
- rhs.nonce + kNonceSize);
- }
- };
-
enum BrokerableType {
PLACEHOLDER,
WIN_HANDLE,
MACH_PORT,
};
- // The identifier is unique across all Chrome processes.
- AttachmentId GetIdentifier() const;
-
// Whether the attachment still needs information from the broker before it
// can be used.
bool NeedsBrokering() const;
@@ -75,14 +43,9 @@ class IPC_EXPORT BrokerableAttachment : public MessageAttachment {
protected:
BrokerableAttachment();
- BrokerableAttachment(const AttachmentId& id);
~BrokerableAttachment() override;
private:
- // This member uniquely identifies a BrokerableAttachment across all Chrome
- // processes.
- const AttachmentId id_;
-
DISALLOW_COPY_AND_ASSIGN(BrokerableAttachment);
};
« no previous file with comments | « ipc/attachment_broker_unprivileged_win.cc ('k') | ipc/brokerable_attachment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698