Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: content/common/sandbox_mac.mm

Issue 1849343003: mac: Remove IsOSSnowLeopard(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/common/common.sb ('k') | ipc/attachment_broker_mac_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir)) 484 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir))
485 return false; 485 return false;
486 486
487 bool lion_or_later = base::mac::IsOSLionOrLater(); 487 bool lion_or_later = base::mac::IsOSLionOrLater();
488 if (!compiler.InsertBooleanParam("LION_OR_LATER", lion_or_later)) 488 if (!compiler.InsertBooleanParam("LION_OR_LATER", lion_or_later))
489 return false; 489 return false;
490 bool elcap_or_later = base::mac::IsOSElCapitanOrLater(); 490 bool elcap_or_later = base::mac::IsOSElCapitanOrLater();
491 if (!compiler.InsertBooleanParam("ELCAP_OR_LATER", elcap_or_later)) 491 if (!compiler.InsertBooleanParam("ELCAP_OR_LATER", elcap_or_later))
492 return false; 492 return false;
493 493
494 #if defined(COMPONENT_BUILD)
495 // dlopen() fails without file-read-metadata access if the executable image
496 // contains LC_RPATH load commands. The components build uses those.
497 // See http://crbug.com/127465
498 if (base::mac::IsOSSnowLeopard()) {
499 if (!compiler.InsertBooleanParam("COMPONENT_BUILD_WORKAROUND", true))
500 return false;
501 }
502 #endif
503
504 // Initialize sandbox. 494 // Initialize sandbox.
505 std::string error_str; 495 std::string error_str;
506 bool success = compiler.CompileAndApplyProfile(&error_str); 496 bool success = compiler.CompileAndApplyProfile(&error_str);
507 DLOG_IF(FATAL, !success) << "Failed to initialize sandbox: " << error_str; 497 DLOG_IF(FATAL, !success) << "Failed to initialize sandbox: " << error_str;
508 gSandboxIsActive = success; 498 gSandboxIsActive = success;
509 return success; 499 return success;
510 } 500 }
511 501
512 // static 502 // static
513 bool Sandbox::SandboxIsCurrentlyActive() { 503 bool Sandbox::SandboxIsCurrentlyActive() {
(...skipping 13 matching lines...) Expand all
527 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { 517 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) {
528 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " 518 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
529 << path.value(); 519 << path.value();
530 return path; 520 return path;
531 } 521 }
532 522
533 return base::FilePath(canonical_path); 523 return base::FilePath(canonical_path);
534 } 524 }
535 525
536 } // namespace content 526 } // namespace content
OLDNEW
« no previous file with comments | « content/common/common.sb ('k') | ipc/attachment_broker_mac_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698