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

Unified Diff: ipc/brokerable_attachment.h

Issue 1188923003: Stub in more IPC attachment brokering functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change the wireformat to use int32_t for HANDLE. Created 5 years, 6 months 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
Index: ipc/brokerable_attachment.h
diff --git a/ipc/brokerable_attachment.h b/ipc/brokerable_attachment.h
index 42d8e9f1d9c9e536a5125f0a43273923b176b82d..5b8395551cbe3f660c88f68dd1c8553d577e0a1e 100644
--- a/ipc/brokerable_attachment.h
+++ b/ipc/brokerable_attachment.h
@@ -17,14 +17,24 @@ 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 {
- uint32_t nonce[4];
+ uint8_t nonce[kNonceSize];
+ };
+
+ enum BrokerableType {
+ WIN_HANDLE,
};
// The identifier is unique across all Chrome processes.
AttachmentId GetIdentifier() const;
+ // Returns TYPE_BROKERABLE_ATTACHMENT
+ Type GetType() const override;
+
+ virtual BrokerableType GetBrokerableType() const = 0;
+
protected:
BrokerableAttachment();
~BrokerableAttachment() override;
@@ -32,7 +42,7 @@ class IPC_EXPORT BrokerableAttachment : public MessageAttachment {
private:
// This member uniquely identifies a BrokerableAttachment across all Chrome
// processes.
- AttachmentId id_;
+ const AttachmentId id_;
DISALLOW_COPY_AND_ASSIGN(BrokerableAttachment);
};

Powered by Google App Engine
This is Rietveld 408576698