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

Unified Diff: chrome/utility/safe_browsing/mac/crdmg.cc

Issue 2369553002: Suppress sandbox deprecation warnings by using the Seatbelt wrapper. (Closed)
Patch Set: Suppress sandbox deprecation warnings by using the Seatbelt wrapper. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/utility/safe_browsing/mac/BUILD.gn ('k') | ipc/ipc_send_fds_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/safe_browsing/mac/crdmg.cc
diff --git a/chrome/utility/safe_browsing/mac/crdmg.cc b/chrome/utility/safe_browsing/mac/crdmg.cc
index 8dc0bc9d3cf440aa3348603fa3f090acb6cb056b..dcaaa8daa665b12a2fd43e856d3fe9af64bd24a6 100644
--- a/chrome/utility/safe_browsing/mac/crdmg.cc
+++ b/chrome/utility/safe_browsing/mac/crdmg.cc
@@ -24,6 +24,7 @@
#include "chrome/utility/safe_browsing/mac/hfs.h"
#include "chrome/utility/safe_browsing/mac/read_stream.h"
#include "chrome/utility/safe_browsing/mac/udif.h"
+#include "sandbox/mac/seatbelt.h"
// This executable only works on 10.10+, so unconditionally use these functions
// to make sandboxing easier.
@@ -156,14 +157,11 @@ bool SafeDMG::EnableSandbox() {
}
char* sbox_error;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- if (sandbox_init(sbox_profile.c_str(), 0, &sbox_error) != 0) {
+ if (sandbox::Seatbelt::Init(sbox_profile.c_str(), 0, &sbox_error) != 0) {
LOG(ERROR) << "Failed to initialize sandbox: " << sbox_error;
- sandbox_free_error(sbox_error);
+ sandbox::Seatbelt::FreeError(sbox_error);
return false;
}
-#pragma clang diagnostic pop
return true;
}
« no previous file with comments | « chrome/utility/safe_browsing/mac/BUILD.gn ('k') | ipc/ipc_send_fds_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698