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

Side by Side Diff: sandbox/linux/syscall_broker/broker_process.h

Issue 717673002: Linux sandbox: introduce BrokerChannel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LINUX_SERVICES_BROKER_PROCESS_H_ 5 #ifndef SANDBOX_LINUX_SERVICES_BROKER_PROCESS_H_
6 #define SANDBOX_LINUX_SERVICES_BROKER_PROCESS_H_ 6 #define SANDBOX_LINUX_SERVICES_BROKER_PROCESS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // return -EPERM on other flags. 64 // return -EPERM on other flags.
65 // It's similar to the open() system call and will return -errno on errors. 65 // It's similar to the open() system call and will return -errno on errors.
66 int Open(const char* pathname, int flags) const; 66 int Open(const char* pathname, int flags) const;
67 67
68 int broker_pid() const { return broker_pid_; } 68 int broker_pid() const { return broker_pid_; }
69 69
70 private: 70 private:
71 friend class BrokerProcessTestHelper; 71 friend class BrokerProcessTestHelper;
72 72
73 // Close the IPC channel with the other party. This should only be used 73 // Close the IPC channel with the other party. This should only be used
74 // by tests. 74 // by tests an none of the class methods should be used afterwards.
75 void CloseChannel(); 75 void CloseChannel();
76 76
77 bool initialized_; // Whether we've been through Init() yet. 77 bool initialized_; // Whether we've been through Init() yet.
78 bool is_child_; // Whether we're the child (broker process). 78 const bool fast_check_in_client_;
79 bool fast_check_in_client_; 79 const bool quiet_failures_for_tests_;
80 bool quiet_failures_for_tests_;
81 pid_t broker_pid_; // The PID of the broker (child). 80 pid_t broker_pid_; // The PID of the broker (child).
82 syscall_broker::BrokerPolicy policy_; // The sandboxing policy. 81 syscall_broker::BrokerPolicy policy_; // The sandboxing policy.
83 scoped_ptr<syscall_broker::BrokerClient> 82 scoped_ptr<syscall_broker::BrokerClient> broker_client_;
84 broker_client_; // Can only exist if is_child_ is true.
85
86 int ipc_socketpair_; // Our communication channel to parent or child.
87 83
88 DISALLOW_COPY_AND_ASSIGN(BrokerProcess); 84 DISALLOW_COPY_AND_ASSIGN(BrokerProcess);
89 }; 85 };
90 86
91 } // namespace syscall_broker 87 } // namespace syscall_broker
92 88
93 } // namespace sandbox 89 } // namespace sandbox
94 90
95 #endif // SANDBOX_LINUX_SERVICES_BROKER_PROCESS_H_ 91 #endif // SANDBOX_LINUX_SERVICES_BROKER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698