    // 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.
+@@ -50,6 +53,7 @@ void DisconnectWindowServer() {
    SetApplicationIsDaemon(true);
+   // Tell LaunchServices to continue without a connection to the daemon.
+   _LSSetApplicationLaunchServicesServerConnectionStatus(0, nullptr);
 +#endif
  }
  

 
 // Returns a subrole based upon the role.
 - (NSString*) subrole {
@@ -2024,10 +2038,12 @@ NSString* const NSAccessibilityRequiredAttribute = @"AXRequired";
   NSString* value = base::SysUTF16ToNSString(browserAccessibility_->GetValue());
   NSMutableAttributedString* attributedValue =
       [[[NSMutableAttributedString alloc] initWithString:value] autorelease];
+#ifndef MAS_BUILD
   std::vector<const BrowserAccessibility*> textOnlyObjects =
       BrowserAccessibilityManager::FindTextOnlyObjectsInRange(
           *browserAccessibility_, *browserAccessibility_);
   AddMisspelledTextAttributes(textOnlyObjects, attributedValue);
+#endif
   return [attributedValue attributedSubstringFromRange:range];
 }
 
@@ -2147,6 +2163,7 @@ NSString* const NSAccessibilityRequiredAttribute = @"AXRequired";
     return nil;
   }

 extern "C" {
 void CGSSetDenyWindowServerConnections(bool);
 void CGSShutdownServerConnections();
@@ -29,6 +30,7 @@ void _LSSetApplicationLaunchServicesServerConnectionStatus(
     uint64_t flags,
     bool (^connection_allowed)(CFDictionaryRef));
 };
+#endif
 
 namespace content {
 
@@ -37,6 +39,7 @@ namespace {
 // This disconnects from the window server, and then indicates that Chrome
 // should continue execution without access to launchservicesd.
 void DisconnectWindowServer() {
