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

Side by Side Diff: ipc/attachment_broker_privileged.h

Issue 1484763003: ipc: Slight change to GetSenderWithProcessId(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | 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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 static void CreateBrokerIfNeeded(); 40 static void CreateBrokerIfNeeded();
41 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 41 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
42 42
43 // AttachmentBroker overrides. 43 // AttachmentBroker overrides.
44 void RegisterCommunicationChannel(Endpoint* endpoint) override; 44 void RegisterCommunicationChannel(Endpoint* endpoint) override;
45 void DeregisterCommunicationChannel(Endpoint* endpoint) override; 45 void DeregisterCommunicationChannel(Endpoint* endpoint) override;
46 46
47 protected: 47 protected:
48 // Returns the sender whose peer's process id is |id|. 48 // Returns the sender whose peer's process id is |id|.
49 // Returns nullptr if no sender is found. 49 // Returns nullptr if no sender is found.
50 // The lock returned by get_lock() must already be acquired before calling
51 // this method. The return value is only guaranteed to be valid while the lock
52 // is held.
50 Sender* GetSenderWithProcessId(base::ProcessId id); 53 Sender* GetSenderWithProcessId(base::ProcessId id);
51 54
52 // Errors that can be reported by subclasses. 55 // Errors that can be reported by subclasses.
53 // These match tools/metrics/histograms.xml. 56 // These match tools/metrics/histograms.xml.
54 // This enum is append-only. 57 // This enum is append-only.
55 enum UMAError { 58 enum UMAError {
56 // The brokerable attachment had a valid destination. This is the success 59 // The brokerable attachment had a valid destination. This is the success
57 // case. 60 // case.
58 DESTINATION_FOUND = 0, 61 DESTINATION_FOUND = 0,
59 // The brokerable attachment had a destination, but the broker did not have 62 // The brokerable attachment had a destination, but the broker did not have
(...skipping 29 matching lines...) Expand all
89 void LogError(UMAError error); 92 void LogError(UMAError error);
90 93
91 private: 94 private:
92 std::vector<Endpoint*> endpoints_; 95 std::vector<Endpoint*> endpoints_;
93 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivileged); 96 DISALLOW_COPY_AND_ASSIGN(AttachmentBrokerPrivileged);
94 }; 97 };
95 98
96 } // namespace IPC 99 } // namespace IPC
97 100
98 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_H_ 101 #endif // IPC_ATTACHMENT_BROKER_PRIVILEGED_H_
OLDNEW
« no previous file with comments | « no previous file | ipc/attachment_broker_privileged.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698