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

Side by Side Diff: ipc/attachment_broker_unprivileged.h

Issue 1258323004: Reland #1: Clean up interface of attachment broker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « ipc/attachment_broker_privileged_win_unittest.cc ('k') | ipc/attachment_broker_unprivileged.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_ 5 #ifndef IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
6 #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_ 6 #define IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
7 7
8 #include "ipc/attachment_broker.h" 8 #include "ipc/attachment_broker.h"
9 #include "ipc/ipc_export.h" 9 #include "ipc/ipc_export.h"
10 10
11 namespace IPC { 11 namespace IPC {
12 12
13 class Channel;
13 class Sender; 14 class Sender;
14 15
15 // This abstract subclass of AttachmentBroker is intended for use in 16 // This abstract subclass of AttachmentBroker is intended for use in
16 // non-privileged processes. 17 // non-privileged processes.
17 class IPC_EXPORT AttachmentBrokerUnprivileged : public IPC::AttachmentBroker { 18 class IPC_EXPORT AttachmentBrokerUnprivileged : public IPC::AttachmentBroker {
18 public: 19 public:
19 AttachmentBrokerUnprivileged(); 20 AttachmentBrokerUnprivileged();
20 ~AttachmentBrokerUnprivileged() override; 21 ~AttachmentBrokerUnprivileged() override;
21 22
22 void set_sender(IPC::Sender* sender) { sender_ = sender; } 23 // In each unprivileged process, exactly one channel should be used to
24 // communicate brokerable attachments with the broker process.
25 void DesignateBrokerCommunicationChannel(IPC::Channel* channel);
23 26
24 protected: 27 protected:
25 IPC::Sender* get_sender() { return sender_; } 28 IPC::Sender* get_sender() { return sender_; }
26 29
27 private: 30 private:
28 // |sender_| is used to send Messages to the privileged broker process. 31 // |sender_| is used to send Messages to the privileged broker process.
29 // |sender_| must live at least as long as this instance. 32 // |sender_| must live at least as long as this instance.
30 IPC::Sender* sender_; 33 IPC::Sender* sender_;
31 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerUnprivileged); 34 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerUnprivileged);
32 }; 35 };
33 36
34 } // namespace IPC 37 } // namespace IPC
35 38
36 #endif // IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_ 39 #endif // IPC_ATTACHMENT_BROKER_UNPRIVILEGED_H_
OLDNEW
« no previous file with comments | « ipc/attachment_broker_privileged_win_unittest.cc ('k') | ipc/attachment_broker_unprivileged.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698