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

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

Issue 2369553002: Suppress sandbox deprecation warnings by using the Seatbelt wrapper. (Closed)
Patch Set: Created 4 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
« sandbox/mac/seatbelt.h ('K') | « sandbox/mac/seatbelt.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "sandbox/mac/seatbelt.h" 5 #include "sandbox/mac/seatbelt.h"
6 6
7 extern "C" { 7 extern "C" {
8 #include <sandbox.h> 8 #include <sandbox.h>
9 9
10 int sandbox_init_with_parameters(const char* profile, 10 int sandbox_init_with_parameters(const char* profile,
(...skipping 25 matching lines...) Expand all
36 // static 36 // static
37 void Seatbelt::FreeError(char* errorbuf) { 37 void Seatbelt::FreeError(char* errorbuf) {
38 // OS X deprecated these functions, but did not provide a suitable replacement, 38 // OS X deprecated these functions, but did not provide a suitable replacement,
39 // so ignore the deprecation warning. 39 // so ignore the deprecation warning.
40 #pragma clang diagnostic push 40 #pragma clang diagnostic push
41 #pragma clang diagnostic ignored "-Wdeprecated-declarations" 41 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
42 return ::sandbox_free_error(errorbuf); 42 return ::sandbox_free_error(errorbuf);
43 #pragma clang diagnostic pop 43 #pragma clang diagnostic pop
44 } 44 }
45 45
46 // static
47 const char* Seatbelt::ProfileNoInternet() {
48 #pragma clang diagnostic push
49 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
50 return kSBXProfileNoInternet;
51 #pragma clang diagnostic pop
52 }
53
54 // static
55 const char* Seatbelt::ProfileNoNetwork() {
56 #pragma clang diagnostic push
57 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
58 return kSBXProfileNoNetwork;
59 #pragma clang diagnostic pop
60 }
61
62 // static
63 const char* Seatbelt::ProfileNoWrite() {
64 #pragma clang diagnostic push
65 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
66 return kSBXProfileNoWrite;
67 #pragma clang diagnostic pop
68 }
69
70 // static
71 const char* Seatbelt::ProfileNoWriteExceptTemporary() {
72 #pragma clang diagnostic push
73 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
74 return kSBXProfileNoWriteExceptTemporary;
75 #pragma clang diagnostic pop
76 }
77
78 // static
79 const char* Seatbelt::ProfilePureComputation() {
80 #pragma clang diagnostic push
81 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
82 return kSBXProfilePureComputation;
83 #pragma clang diagnostic pop
84 }
85
46 } // namespace sandbox 86 } // namespace sandbox
OLDNEW
« sandbox/mac/seatbelt.h ('K') | « sandbox/mac/seatbelt.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698