OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/sandbox_mac.h" | 5 #include "content/common/sandbox_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include <CoreFoundation/CFTimeZone.h> | 9 #include <CoreFoundation/CFTimeZone.h> |
10 extern "C" { | 10 extern "C" { |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 FatalStringQuoteException(home_dir_canonical.value()); | 521 FatalStringQuoteException(home_dir_canonical.value()); |
522 return false; | 522 return false; |
523 } | 523 } |
524 | 524 |
525 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir)) | 525 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir)) |
526 return false; | 526 return false; |
527 | 527 |
528 bool lion_or_later = base::mac::IsOSLionOrLater(); | 528 bool lion_or_later = base::mac::IsOSLionOrLater(); |
529 if (!compiler.InsertBooleanParam("LION_OR_LATER", lion_or_later)) | 529 if (!compiler.InsertBooleanParam("LION_OR_LATER", lion_or_later)) |
530 return false; | 530 return false; |
| 531 bool elcap_or_later = base::mac::IsOSElCapitanOrLater(); |
| 532 if (!compiler.InsertBooleanParam("ELCAP_OR_LATER", elcap_or_later)) |
| 533 return false; |
531 | 534 |
532 #if defined(COMPONENT_BUILD) | 535 #if defined(COMPONENT_BUILD) |
533 // dlopen() fails without file-read-metadata access if the executable image | 536 // dlopen() fails without file-read-metadata access if the executable image |
534 // contains LC_RPATH load commands. The components build uses those. | 537 // contains LC_RPATH load commands. The components build uses those. |
535 // See http://crbug.com/127465 | 538 // See http://crbug.com/127465 |
536 if (base::mac::IsOSSnowLeopard()) { | 539 if (base::mac::IsOSSnowLeopard()) { |
537 if (!compiler.InsertBooleanParam("COMPONENT_BUILD_WORKAROUND", true)) | 540 if (!compiler.InsertBooleanParam("COMPONENT_BUILD_WORKAROUND", true)) |
538 return false; | 541 return false; |
539 } | 542 } |
540 #endif | 543 #endif |
(...skipping 24 matching lines...) Expand all Loading... |
565 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { | 568 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { |
566 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " | 569 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " |
567 << path.value(); | 570 << path.value(); |
568 return path; | 571 return path; |
569 } | 572 } |
570 | 573 |
571 return base::FilePath(canonical_path); | 574 return base::FilePath(canonical_path); |
572 } | 575 } |
573 | 576 |
574 } // namespace content | 577 } // namespace content |
OLD | NEW |