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

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

Issue 2369553002: Suppress sandbox deprecation warnings by using the Seatbelt wrapper. (Closed)
Patch Set: Created 4 years, 2 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_MAC_SEATBELT_H_ 5 #ifndef SANDBOX_MAC_SEATBELT_H_
6 #define SANDBOX_MAC_SEATBELT_H_ 6 #define SANDBOX_MAC_SEATBELT_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "sandbox/mac/seatbelt_export.h" 11 #include "sandbox/mac/seatbelt_export.h"
12 12
13 namespace sandbox { 13 namespace sandbox {
14 14
15 // This class exists because OS X deprecated the sandbox functions, 15 // This class exists because OS X deprecated the sandbox functions,
16 // and did not supply replacements that are suitable for Chrome. 16 // and did not supply replacements that are suitable for Chrome.
17 // This class wraps the functions in deprecation warning supressions. 17 // This class wraps the functions in deprecation warning supressions.
18 class SEATBELT_EXPORT Seatbelt { 18 class SEATBELT_EXPORT Seatbelt {
19 public: 19 public:
20 static int Init(const char* profile, uint64_t flags, char** errorbuf); 20 static int Init(const char* profile, uint64_t flags, char** errorbuf);
21 21
22 static int InitWithParams(const char* profile, 22 static int InitWithParams(const char* profile,
23 uint64_t flags, 23 uint64_t flags,
24 const char* const parameters[], 24 const char* const parameters[],
25 char** errorbuf); 25 char** errorbuf);
26 26
27 static void FreeError(char* errorbuf); 27 static void FreeError(char* errorbuf);
28 28
29 static const char* ProfileNoInternet();
Robert Sesek 2016/09/23 19:08:47 Do these need to be functions, or can they be stat
Greg K 2016/09/23 20:32:05 Done.
30
31 static const char* ProfileNoNetwork();
32
33 static const char* ProfileNoWrite();
34
35 static const char* ProfileNoWriteExceptTemporary();
36
37 static const char* ProfilePureComputation();
38
29 private: 39 private:
30 Seatbelt(); 40 Seatbelt();
31 DISALLOW_COPY_AND_ASSIGN(Seatbelt); 41 DISALLOW_COPY_AND_ASSIGN(Seatbelt);
32 }; 42 };
33 43
34 } // sandbox 44 } // sandbox
35 45
36 #endif // SANDBOX_MAC_SEATBELT_H_ 46 #endif // SANDBOX_MAC_SEATBELT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698