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

Side by Side Diff: ipc/attachment_broker_privileged.h

Issue 1679763002: Clean up public interface of AttachmentBrokerUnprivileged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove CHECK. Created 4 years, 10 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_mac_unittest.cc ('k') | ipc/attachment_broker_privileged.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_PRIVILEGED_H_ 5 #ifndef IPC_ATTACHMENT_BROKER_PRIVILEGED_H_
6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_H_ 6 #define IPC_ATTACHMENT_BROKER_PRIVILEGED_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 43 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
44 44
45 // Similar to CreateBrokerIfNeeded(), but useful for single process unit tests 45 // Similar to CreateBrokerIfNeeded(), but useful for single process unit tests
46 // that don't need real attachment brokering, and don't want to deal with 46 // that don't need real attachment brokering, and don't want to deal with
47 // setting up a fake PortProvider. 47 // setting up a fake PortProvider.
48 static void CreateBrokerForSingleProcessTests(); 48 static void CreateBrokerForSingleProcessTests();
49 49
50 // AttachmentBroker overrides. 50 // AttachmentBroker overrides.
51 void RegisterCommunicationChannel(Endpoint* endpoint) override; 51 void RegisterCommunicationChannel(Endpoint* endpoint) override;
52 void DeregisterCommunicationChannel(Endpoint* endpoint) override; 52 void DeregisterCommunicationChannel(Endpoint* endpoint) override;
53 bool IsPrivilegedBroker() override;
53 54
54 protected: 55 protected:
55 // Returns the sender whose peer's process id is |id|. 56 // Returns the sender whose peer's process id is |id|.
56 // Returns nullptr if no sender is found. 57 // Returns nullptr if no sender is found.
57 // The lock returned by get_lock() must already be acquired before calling 58 // The lock returned by get_lock() must already be acquired before calling
58 // this method. The return value is only guaranteed to be valid while the lock 59 // this method. The return value is only guaranteed to be valid while the lock
59 // is held. 60 // is held.
60 Sender* GetSenderWithProcessId(base::ProcessId id); 61 Sender* GetSenderWithProcessId(base::ProcessId id);
61 62
62 // Errors that can be reported by subclasses. 63 // Errors that can be reported by subclasses.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 void LogError(UMAError error); 105 void LogError(UMAError error);
105 106
106 private: 107 private:
107 std::vector<Endpoint*> endpoints_; 108 std::vector<Endpoint*> endpoints_;
108 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivileged); 109 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivileged);
109 }; 110 };
110 111
111 } // namespace IPC 112 } // namespace IPC
112 113
113 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_H_ 114 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_H_
OLDNEW
« no previous file with comments | « ipc/attachment_broker_mac_unittest.cc ('k') | ipc/attachment_broker_privileged.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698