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

Unified Diff: sandbox/linux/syscall_broker/broker_process.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/syscall_broker/broker_host.cc ('k') | sandbox/linux/syscall_broker/broker_process.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/syscall_broker/broker_process.h
diff --git a/sandbox/linux/syscall_broker/broker_process.h b/sandbox/linux/syscall_broker/broker_process.h
index d5b521b996c622801eb6f29f760c32bd4617cbb9..50e7eee034ad2f955b1d9d7a551d3d8df53f225c 100644
--- a/sandbox/linux/syscall_broker/broker_process.h
+++ b/sandbox/linux/syscall_broker/broker_process.h
@@ -19,8 +19,8 @@
namespace sandbox {
namespace syscall_broker {
+
class BrokerClient;
-}
// Create a new "broker" process to which we can send requests via an IPC
// channel by forking the current process.
@@ -68,21 +68,24 @@ class SANDBOX_EXPORT BrokerProcess {
int broker_pid() const { return broker_pid_; }
private:
+ friend class BrokerProcessTestHelper;
+
+ // Close the IPC channel with the other party. This should only be used
+ // by tests an none of the class methods should be used afterwards.
+ void CloseChannel();
+
bool initialized_; // Whether we've been through Init() yet.
- bool is_child_; // Whether we're the child (broker process).
- bool fast_check_in_client_;
- bool quiet_failures_for_tests_;
+ const bool fast_check_in_client_;
+ const bool quiet_failures_for_tests_;
pid_t broker_pid_; // The PID of the broker (child).
syscall_broker::BrokerPolicy policy_; // The sandboxing policy.
- scoped_ptr<syscall_broker::BrokerClient>
- broker_client_; // Can only exist if is_child_ is true.
+ scoped_ptr<syscall_broker::BrokerClient> broker_client_;
- int ipc_socketpair_; // Our communication channel to parent or child.
DISALLOW_COPY_AND_ASSIGN(BrokerProcess);
-
- friend class BrokerProcessTestHelper;
};
+} // namespace syscall_broker
+
} // namespace sandbox
#endif // SANDBOX_LINUX_SERVICES_BROKER_PROCESS_H_
« no previous file with comments | « sandbox/linux/syscall_broker/broker_host.cc ('k') | sandbox/linux/syscall_broker/broker_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698