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

Side by Side Diff: sandbox/mac/bootstrap_sandbox.h

Issue 1411523006: mac: Make Mach port scopers better ScopedGenerics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 5 years, 2 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_unprivileged_mac.cc ('k') | sandbox/mac/launchd_interception_server.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SANDBOX_MAC_BOOTSTRAP_SANDBOX_H_ 5 #ifndef SANDBOX_MAC_BOOTSTRAP_SANDBOX_H_
6 #define SANDBOX_MAC_BOOTSTRAP_SANDBOX_H_ 6 #define SANDBOX_MAC_BOOTSTRAP_SANDBOX_H_
7 7
8 #include <mach/mach.h> 8 #include <mach/mach.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // Called in the parent when a process has died. It cleans up the references 77 // Called in the parent when a process has died. It cleans up the references
78 // to the process. 78 // to the process.
79 void InvalidateClient(base::ProcessHandle handle); 79 void InvalidateClient(base::ProcessHandle handle);
80 80
81 // Looks up the policy for a given process ID. If no policy is associated 81 // Looks up the policy for a given process ID. If no policy is associated
82 // with the |pid|, this returns NULL. 82 // with the |pid|, this returns NULL.
83 const BootstrapSandboxPolicy* PolicyForProcess(pid_t pid) const; 83 const BootstrapSandboxPolicy* PolicyForProcess(pid_t pid) const;
84 84
85 std::string server_bootstrap_name() const { return server_bootstrap_name_; } 85 std::string server_bootstrap_name() const { return server_bootstrap_name_; }
86 mach_port_t real_bootstrap_port() const { return real_bootstrap_port_; } 86 mach_port_t real_bootstrap_port() const { return real_bootstrap_port_.get(); }
87 87
88 private: 88 private:
89 BootstrapSandbox(); 89 BootstrapSandbox();
90 90
91 // Dispatch callout for when a client sends a message on the 91 // Dispatch callout for when a client sends a message on the
92 // |check_in_port_|. If the client message is valid, it will assign the 92 // |check_in_port_|. If the client message is valid, it will assign the
93 // client from |awaiting_processes_| to |sandboxed_processes_|. 93 // client from |awaiting_processes_| to |sandboxed_processes_|.
94 void HandleChildCheckIn(); 94 void HandleChildCheckIn();
95 95
96 // The name in the system bootstrap server by which the |server_|'s port 96 // The name in the system bootstrap server by which the |server_|'s port
(...skipping 24 matching lines...) Expand all
121 121
122 // The port and dispatch source for receiving client check in messages sent 122 // The port and dispatch source for receiving client check in messages sent
123 // via ClientCheckIn(). 123 // via ClientCheckIn().
124 base::mac::ScopedMachReceiveRight check_in_port_; 124 base::mac::ScopedMachReceiveRight check_in_port_;
125 scoped_ptr<base::DispatchSourceMach> check_in_server_; 125 scoped_ptr<base::DispatchSourceMach> check_in_server_;
126 }; 126 };
127 127
128 } // namespace sandbox 128 } // namespace sandbox
129 129
130 #endif // SANDBOX_MAC_BOOTSTRAP_SANDBOX_H_ 130 #endif // SANDBOX_MAC_BOOTSTRAP_SANDBOX_H_
OLDNEW
« no previous file with comments | « ipc/attachment_broker_unprivileged_mac.cc ('k') | sandbox/mac/launchd_interception_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698