Move //services/service_manager/sandbox to //sandbox/policy.

Originally the sandbox policies lived in //content, but with
servicification this would create unwanted dependencies between
//services and //content. Instead, create a new //sandbox/policy
library to hold the sandbox integration code. This library can depend
on the low-level //sandbox routines, but not nice versa.

Tbr: [email protected] (mechanical change rule)
Bug: 1097376
Change-Id: I1ca9ac0015a625197f2d3aae104e8f7aa78dcfd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2272609
Commit-Queue: Robert Sesek <[email protected]>
Reviewed-by: Ken Rockot <[email protected]>
Reviewed-by: Alex Gough <[email protected]>
Cr-Commit-Position: refs/heads/master@{#786385}
diff --git a/content/renderer/sandbox_mac_v2_unittest.mm b/content/renderer/sandbox_mac_v2_unittest.mm
index a272a85..cad3c4b 100644
--- a/content/renderer/sandbox_mac_v2_unittest.mm
+++ b/content/renderer/sandbox_mac_v2_unittest.mm
@@ -24,9 +24,9 @@
 #include "content/test/test_content_client.h"
 #include "sandbox/mac/sandbox_compiler.h"
 #include "sandbox/mac/seatbelt_exec.h"
-#include "services/service_manager/sandbox/mac/common.sb.h"
-#include "services/service_manager/sandbox/mac/renderer.sb.h"
-#include "services/service_manager/sandbox/mac/sandbox_mac.h"
+#include "sandbox/policy/mac/common.sb.h"
+#include "sandbox/policy/mac/renderer.sb.h"
+#include "sandbox/policy/mac/sandbox_mac.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/multiprocess_func_list.h"
 
@@ -39,39 +39,39 @@
                           const base::FilePath& executable_path) {
   bool enable_logging = true;
   CHECK(compiler->InsertBooleanParam(
-      service_manager::SandboxMac::kSandboxEnableLogging, enable_logging));
+      sandbox::policy::SandboxMac::kSandboxEnableLogging, enable_logging));
   CHECK(compiler->InsertBooleanParam(
-      service_manager::SandboxMac::kSandboxDisableDenialLogging,
+      sandbox::policy::SandboxMac::kSandboxDisableDenialLogging,
       !enable_logging));
 
   std::string homedir =
-      service_manager::SandboxMac::GetCanonicalPath(base::GetHomeDir()).value();
+      sandbox::policy::SandboxMac::GetCanonicalPath(base::GetHomeDir()).value();
   CHECK(compiler->InsertStringParam(
-      service_manager::SandboxMac::kSandboxHomedirAsLiteral, homedir));
+      sandbox::policy::SandboxMac::kSandboxHomedirAsLiteral, homedir));
 
   int32_t major_version, minor_version, bugfix_version;
   base::SysInfo::OperatingSystemVersionNumbers(&major_version, &minor_version,
                                                &bugfix_version);
   int32_t os_version = (major_version * 100) + minor_version;
   CHECK(compiler->InsertStringParam(
-      service_manager::SandboxMac::kSandboxOSVersion,
+      sandbox::policy::SandboxMac::kSandboxOSVersion,
       std::to_string(os_version)));
 
   std::string bundle_path =
-      service_manager::SandboxMac::GetCanonicalPath(base::mac::MainBundlePath())
+      sandbox::policy::SandboxMac::GetCanonicalPath(base::mac::MainBundlePath())
           .value();
   CHECK(compiler->InsertStringParam(
-      service_manager::SandboxMac::kSandboxBundlePath, bundle_path));
+      sandbox::policy::SandboxMac::kSandboxBundlePath, bundle_path));
 
   CHECK(compiler->InsertStringParam(
-      service_manager::SandboxMac::kSandboxChromeBundleId,
+      sandbox::policy::SandboxMac::kSandboxChromeBundleId,
       "com.google.Chrome.test.sandbox"));
   CHECK(compiler->InsertStringParam(
-      service_manager::SandboxMac::kSandboxBrowserPID,
+      sandbox::policy::SandboxMac::kSandboxBrowserPID,
       std::to_string(getpid())));
 
   CHECK(compiler->InsertStringParam(
-      service_manager::SandboxMac::kSandboxLoggingPathAsLiteral,
+      sandbox::policy::SandboxMac::kSandboxLoggingPathAsLiteral,
       logging_path.value()));
 
   // Parameters normally set by the main executable.
@@ -95,8 +95,8 @@
 MULTIPROCESS_TEST_MAIN(SandboxProfileProcess) {
   TestContentClient content_client;
   const std::string profile =
-      std::string(service_manager::kSeatbeltPolicyString_common) +
-      service_manager::kSeatbeltPolicyString_renderer;
+      std::string(sandbox::policy::kSeatbeltPolicyString_common) +
+      sandbox::policy::kSeatbeltPolicyString_renderer;
   sandbox::SandboxCompiler compiler(profile);
 
   // Create the logging file and pass /bin/ls as the executable path.
@@ -104,7 +104,7 @@
   CHECK(temp_dir.CreateUniqueTempDir());
   CHECK(temp_dir.IsValid());
   base::FilePath temp_path = temp_dir.GetPath();
-  temp_path = service_manager::SandboxMac::GetCanonicalPath(temp_path);
+  temp_path = sandbox::policy::SandboxMac::GetCanonicalPath(temp_path);
   const base::FilePath log_file = temp_path.Append("log-file");
   const base::FilePath exec_file("/bin/ls");