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

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

Issue 1346923006: Refactor the bootstrap sandbox process launching integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SANDBOX_MAC_PRE_EXEC_DELEGATE_H_
6 #define SANDBOX_MAC_PRE_EXEC_DELEGATE_H_
7
8 #include "base/process/launch.h"
9
10 namespace sandbox {
11
12 // This PreExecDelegate will communicate with the BootstrapSandbox running
13 // the Mach server registered under |sandbox_server_bootstrap_name|. It will
14 // check in with th BootstrapSandbox using the |sandbox_token| and will
15 // replace the task's bootstrap port with one provided by the sandbox.
16 class PreExecDelegate : public base::LaunchOptions::PreExecDelegate {
17 public:
18 PreExecDelegate(const std::string& sandbox_server_bootstrap_name,
19 uint64_t sandbox_token);
20 ~PreExecDelegate() override;
21
22 void RunAsyncSafe() override;
23
24 private:
25 const std::string sandbox_server_bootstrap_name_;
26 const char* const sandbox_server_bootstrap_name_ptr_;
27 const uint64_t sandbox_token_;
28
29 DISALLOW_COPY_AND_ASSIGN(PreExecDelegate);
30 };
31
32 } // namespace sandbox
33
34 #endif // SANDBOX_MAC_PRE_EXEC_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698