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

Unified Diff: ipc/brokerable_attachment.h

Issue 1180313007: IPC: Add new classes required for attachment brokering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark overriding method with override. 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
new file mode 100644
index 0000000000000000000000000000000000000000..026b70ac8d1689b6d0d403e196830a823503fe09
--- /dev/null
+++ b/ipc/brokerable_attachment.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IPC_BROKERABLE_ATTACHMENT_H_
+#define IPC_BROKERABLE_ATTACHMENT_H_
+
+#include <stdint.h>
+
+#include "base/macros.h"
+#include "ipc/ipc_export.h"
+#include "ipc/ipc_message_attachment.h"
+
+namespace IPC {
+
+// An id uniquely identifies an attachment sent via a broker.
Tom Sepez 2015/06/16 17:23:22 nit: maybe this is nested inside as BrokerableAtta
erikchen 2015/06/16 17:56:42 Done.
+struct IPC_EXPORT BrokerableAttachmentId {
+ uint32_t nonce[4];
+};
+
+// This subclass of MessageAttachment requires an AttachmentBroker to be
+// attached to a Chrome IPC message.
+class IPC_EXPORT BrokerableAttachment : public MessageAttachment {
+ public:
+ // The identifier is unique across all Chrome processes.
+ BrokerableAttachmentId GetIdentifier() const;
+
+ protected:
+ BrokerableAttachment();
+ ~BrokerableAttachment() override;
+
+ private:
+ // This member uniquely identifies a BrokerableAttachment across all Chrome
+ // processes.
+ BrokerableAttachmentId id_;
+ DISALLOW_COPY_AND_ASSIGN(BrokerableAttachment);
+};
+
+} // namespace IPC
+
+#endif // IPC_BROKERABLE_ATTACHMENT_H_

Powered by Google App Engine
This is Rietveld 408576698