 +#endif
  
  namespace content {
- namespace {
+ 
 @@ -306,6 +308,7 @@ void Sandbox::SandboxWarmup(int sandbox_type) {
-   }
- 
-   if (sandbox_type == SANDBOX_TYPE_RENDERER) {
-+#ifndef MAS_BUILD
-     // Now disconnect from WindowServer, after all objects have been warmed up.
-     // Shutting down the connection requires connecting to WindowServer,
-     // so do this before actually engaging the sandbox. This may cause two log
+ // This disconnects from the window server, and then indicates that Chrome
+ // should continue execution without access to launchservicesd.
+ void DisconnectWindowServer() {
++#ifndef MAS_BUILD
+   // Now disconnect from WindowServer, after all objects have been warmed up.
+   // Shutting down the connection requires connecting to WindowServer,
+   // so do this before actually engaging the sandbox. This may cause two log
 @@ -318,6 +321,7 @@ void Sandbox::SandboxWarmup(int sandbox_type) {
-     // launchservicesd to get an ASN. By setting this flag, HIServices skips
-     // that.
-     SetApplicationIsDaemon(true);
-+#endif
-   }
- }
- 
+   // launchservicesd to get an ASN. By setting this flag, HIServices skips
+   // that.
+   SetApplicationIsDaemon(true);
++#endif
+ }
+ 
+ // You are about to read a pretty disgusting hack. In a static initializer,
 diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
 index c9c9d9231af0..2938808c4db0 100644
 --- a/net/dns/dns_config_service_posix.cc

     }
   }
 
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index 2c219956f05a..9fee8277e081 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -41,11 +41,13 @@
 #include "ui/base/layout.h"
 #include "ui/gl/init/gl_factory.h"
 
+#ifndef MAS_BUILD
 extern "C" {

       {NSAccessibilitySortDirectionAttribute, @"sortDirection"},
       {NSAccessibilitySubroleAttribute, @"subrole"},
@@ -964,6 +972,7 @@ NSString* const NSAccessibilityRequiredAttribute = @"AXRequired";
                                   ui::AX_RESTRICTION_DISABLED];
 }
 
+#ifndef MAS_BUILD
