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

Unified Diff: ipc/attachment_broker_unprivileged.h

Issue 1256993003: ipc: Create AttachmentBrokerPrivileged and AttachmentBrokerUnprivileged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_ipc_message_feature
Patch Set: Rebase. Created 5 years, 5 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/attachment_broker_unprivileged.h
diff --git a/ipc/attachment_broker_unprivileged.h b/ipc/attachment_broker_unprivileged.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d98d495932d59ed98d6950d658c00b6a7944362
--- /dev/null
+++ b/ipc/attachment_broker_unprivileged.h
@@ -0,0 +1,36 @@
+// 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_ATTACHMENT_BROKER_UNPRIVILEGED_H_
+#define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
+
+#include "ipc/attachment_broker.h"
+#include "ipc/ipc_export.h"
+
+namespace IPC {
+
+class Sender;
+
+// This abstract subclass of AttachmentBroker is intended for use in
+// non-privileged processes.
+class IPC_EXPORT AttachmentBrokerUnprivileged : public IPC::AttachmentBroker {
+ public:
+ AttachmentBrokerUnprivileged();
+ ~AttachmentBrokerUnprivileged() override;
+
+ void set_sender(IPC::Sender* sender) { sender_ = sender; }
+
+ protected:
+ IPC::Sender* get_sender() { return sender_; }
+
+ private:
+ // |sender_| is used to send Messages to the privileged broker process.
+ // |sender_| must live at least as long as this instance.
+ IPC::Sender* sender_;
+ DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerUnprivileged);
+};
+
+} // namespace IPC
+
+#endif // IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_

Powered by Google App Engine
This is Rietveld 408576698