Index: sandbox/linux/services/broker_process.cc |
diff --git a/sandbox/linux/services/broker_process.cc b/sandbox/linux/services/broker_process.cc |
index 438e9726374707a59d6555b96e8009c195081cae..9458bbc60b4114640e96fa83b0e8744e6b249f1a 100644 |
--- a/sandbox/linux/services/broker_process.cc |
+++ b/sandbox/linux/services/broker_process.cc |
@@ -16,6 +16,7 @@ |
#include <vector> |
#include "base/basictypes.h" |
+#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/logging.h" |
#include "base/pickle.h" |
@@ -136,7 +137,8 @@ BrokerProcess::~BrokerProcess() { |
} |
} |
-bool BrokerProcess::Init(bool (*sandbox_callback)(void)) { |
+bool BrokerProcess::Init( |
+ const base::Callback<bool(void)>& broker_process_init_callback) { |
CHECK(!initialized_); |
int socket_pair[2]; |
// Use SOCK_SEQPACKET, because we need to preserve message boundaries |
@@ -174,9 +176,7 @@ bool BrokerProcess::Init(bool (*sandbox_callback)(void)) { |
ipc_socketpair_ = socket_pair[0]; |
is_child_ = true; |
// Enable the sandbox if provided. |
jln (very slow on Chromium)
2014/02/20 23:38:52
Change the comment (or just remove it).
dshwang
2014/02/21 07:03:13
it's mistake. done.
|
- if (sandbox_callback) { |
- CHECK(sandbox_callback()); |
- } |
+ CHECK(broker_process_init_callback.Run()); |
initialized_ = true; |
for (;;) { |
HandleRequest(); |