Chromium Code Reviews| Index: sandbox/mac/seatbelt.h |
| diff --git a/sandbox/mac/seatbelt.h b/sandbox/mac/seatbelt.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5becc05ee6aedd55e330b7dc4e8afc5a2ad2c0b2 |
| --- /dev/null |
| +++ b/sandbox/mac/seatbelt.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef SANDBOX_MAC_SEATBELT_H_ |
| +#define SANDBOX_MAC_SEATBELT_H_ |
| + |
| +#include <cstdint> |
| + |
| +#include "base/macros.h" |
| +#include "sandbox/sandbox_export.h" |
|
Nico
2016/04/05 18:37:18
Oh, this probably won't work, you probably want a
Greg K
2016/04/05 18:44:54
sandbox/linux uses sandbox_export across all of it
Nico
2016/04/05 18:46:35
It's a problem there too.
(source_sets can share
|
| + |
| +namespace sandbox { |
| + |
| +// This class exists because OS X deprecated the sandbox functions, |
| +// and did not supply replacements that are suitable for Chrome. |
| +// This class wraps the functions in deprecation warning supressions. |
| +class SANDBOX_EXPORT Seatbelt { |
| + public: |
| + static int Init(const char* profile, uint64_t flags, char** errorbuf); |
| + |
| + static int InitWithParams(const char* profile, |
| + uint64_t flags, |
| + const char* const parameters[], |
| + char** errorbuf); |
| + |
| + static void FreeError(char* errorbuf); |
| + |
| + private: |
| + Seatbelt(); |
| + DISALLOW_COPY_AND_ASSIGN(Seatbelt); |
| +}; |
| + |
| +} // sandbox |
| + |
| +#endif // SANDBOX_MAC_SEATBELT_H_ |