0

Enable gn check in //sandbox/mac

Bug: 949535
Change-Id: I71c9abc657f900fe05f3b32e92474009da005d48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577011
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Erik Staab <estaab@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834775}
This commit is contained in:
Leonard Grey
2020-12-08 18:56:44 +00:00
committed by Chromium LUCI CQ
parent c146e49725
commit eed7ae12dc
6 changed files with 19 additions and 12 deletions

1
.gn

@ -181,7 +181,6 @@ no_check_targets = [
"//remoting/test:*", # 20 errors
"//remoting:*", # 27 errors
"//sandbox/linux:*", # 13 errors
"//sandbox/mac:*", # 14 errors
"//sandbox/win:*", # 7 errors
"//third_party/breakpad:*", # 34 errors

@ -11,6 +11,10 @@ proto_library("seatbelt_proto") {
sources = [ "seatbelt.proto" ]
}
source_set("seatbelt_export") {
sources = [ "seatbelt_export.h" ]
}
component("seatbelt") {
sources = [
"sandbox_compiler.cc",
@ -21,10 +25,12 @@ component("seatbelt") {
"seatbelt.h",
"seatbelt_exec.cc",
"seatbelt_exec.h",
"seatbelt_export.h",
]
libs = [ "sandbox" ]
deps = [ ":seatbelt_proto" ]
deps = [
":seatbelt_export",
":seatbelt_proto",
]
public_deps = [ "//third_party/protobuf:protobuf_lite" ]
defines = [ "SEATBELT_IMPLEMENTATION" ]
}
@ -36,6 +42,7 @@ component("seatbelt_extension") {
"seatbelt_extension_token.cc",
"seatbelt_extension_token.h",
]
deps = [ ":seatbelt_export" ]
libs = [ "sandbox" ]
public_deps = [ "//base" ]
defines = [ "SEATBELT_IMPLEMENTATION" ]
@ -43,7 +50,6 @@ component("seatbelt_extension") {
component("system_services") {
sources = [
"seatbelt_export.h",
"system_services.cc",
"system_services.h",
]
@ -51,6 +57,7 @@ component("system_services") {
"Carbon.framework",
"CoreFoundation.framework",
]
deps = [ ":seatbelt_export" ]
public_deps = [ "//base" ]
defines = [ "SEATBELT_IMPLEMENTATION" ]
}
@ -74,6 +81,8 @@ test("sandbox_mac_unittests") {
":seatbelt_proto",
"mojom:test_interfaces",
"//base",
"//base/test:test_config",
"//base/test:test_support",
"//mojo/core/test:run_all_unittests",
"//sandbox/policy:tests",
"//testing/gtest",

@ -8,7 +8,6 @@
#include <map>
#include <string>
#include "base/macros.h"
#include "sandbox/mac/seatbelt_export.h"
namespace sandbox {
@ -20,6 +19,8 @@ class SEATBELT_EXPORT SandboxCompiler {
explicit SandboxCompiler(const std::string& profile_str);
~SandboxCompiler();
SandboxCompiler(const SandboxCompiler& other) = delete;
SandboxCompiler& operator=(const SandboxCompiler& other) = delete;
// Inserts a boolean into the parameters key/value map. A duplicate key is not
// allowed, and will cause the function to return false. The value is not
@ -41,8 +42,6 @@ class SEATBELT_EXPORT SandboxCompiler {
// The sandbox profile source code.
const std::string profile_str_;
DISALLOW_COPY_AND_ASSIGN(SandboxCompiler);
};
} // namespace sandbox

@ -7,7 +7,6 @@
#include <cstdint>
#include "base/macros.h"
#include "sandbox/mac/seatbelt_export.h"
namespace sandbox {
@ -49,9 +48,11 @@ class SEATBELT_EXPORT Seatbelt {
static const char* kProfilePureComputation;
Seatbelt(const Seatbelt& other) = delete;
Seatbelt& operator=(const Seatbelt& other) = delete;
private:
Seatbelt();
DISALLOW_COPY_AND_ASSIGN(Seatbelt);
};
} // sandbox

@ -14,8 +14,7 @@
#include <vector>
#include "base/macros.h"
#include "base/posix/eintr_wrapper.h"
#include "base/posix/eintr_wrapper.h" //nogncheck
#include "sandbox/mac/sandbox_logging.h"
#include "sandbox/mac/seatbelt.h"

@ -7,7 +7,7 @@
#include <string>
#include "base/compiler_specific.h"
#include "base/compiler_specific.h" //nogncheck
#include "sandbox/mac/seatbelt.pb.h"
#include "sandbox/mac/seatbelt_export.h"