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

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

Issue 2271653006: base::mac::IsOSSierra() -> base::mac::IsOS10_12(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Nits Created 4 years, 3 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
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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 464
465 std::string quoted_home_dir; 465 std::string quoted_home_dir;
466 if (!QuotePlainString(home_dir_canonical.value(), &quoted_home_dir)) { 466 if (!QuotePlainString(home_dir_canonical.value(), &quoted_home_dir)) {
467 FatalStringQuoteException(home_dir_canonical.value()); 467 FatalStringQuoteException(home_dir_canonical.value());
468 return false; 468 return false;
469 } 469 }
470 470
471 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir)) 471 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir))
472 return false; 472 return false;
473 473
474 bool elcap_or_later = base::mac::IsOSElCapitanOrLater(); 474 bool elcap_or_later = base::mac::IsAtLeastOS10_11();
475 if (!compiler.InsertBooleanParam("ELCAP_OR_LATER", elcap_or_later)) 475 if (!compiler.InsertBooleanParam("ELCAP_OR_LATER", elcap_or_later))
476 return false; 476 return false;
477 477
478 // Initialize sandbox. 478 // Initialize sandbox.
479 std::string error_str; 479 std::string error_str;
480 bool success = compiler.CompileAndApplyProfile(&error_str); 480 bool success = compiler.CompileAndApplyProfile(&error_str);
481 DLOG_IF(FATAL, !success) << "Failed to initialize sandbox: " << error_str; 481 DLOG_IF(FATAL, !success) << "Failed to initialize sandbox: " << error_str;
482 gSandboxIsActive = success; 482 gSandboxIsActive = success;
483 return success; 483 return success;
484 } 484 }
(...skipping 16 matching lines...) Expand all
501 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { 501 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) {
502 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " 502 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
503 << path.value(); 503 << path.value();
504 return path; 504 return path;
505 } 505 }
506 506
507 return base::FilePath(canonical_path); 507 return base::FilePath(canonical_path);
508 } 508 }
509 509
510 } // namespace content 510 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bootstrap_sandbox_manager_mac.cc ('k') | content/renderer/renderer_main_platform_delegate_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698