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

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

Issue 1917973002: mac: Remove IsOSLion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tapted 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/cursors/webcursor_mac.mm ('k') | content/renderer/render_thread_impl.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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 467
468 std::string quoted_home_dir; 468 std::string quoted_home_dir;
469 if (!QuotePlainString(home_dir_canonical.value(), &quoted_home_dir)) { 469 if (!QuotePlainString(home_dir_canonical.value(), &quoted_home_dir)) {
470 FatalStringQuoteException(home_dir_canonical.value()); 470 FatalStringQuoteException(home_dir_canonical.value());
471 return false; 471 return false;
472 } 472 }
473 473
474 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir)) 474 if (!compiler.InsertStringParam("USER_HOMEDIR_AS_LITERAL", quoted_home_dir))
475 return false; 475 return false;
476 476
477 bool lion_or_later = base::mac::IsOSLionOrLater();
478 if (!compiler.InsertBooleanParam("LION_OR_LATER", lion_or_later))
479 return false;
480 bool elcap_or_later = base::mac::IsOSElCapitanOrLater(); 477 bool elcap_or_later = base::mac::IsOSElCapitanOrLater();
481 if (!compiler.InsertBooleanParam("ELCAP_OR_LATER", elcap_or_later)) 478 if (!compiler.InsertBooleanParam("ELCAP_OR_LATER", elcap_or_later))
482 return false; 479 return false;
483 480
484 // Initialize sandbox. 481 // Initialize sandbox.
485 std::string error_str; 482 std::string error_str;
486 bool success = compiler.CompileAndApplyProfile(&error_str); 483 bool success = compiler.CompileAndApplyProfile(&error_str);
487 DLOG_IF(FATAL, !success) << "Failed to initialize sandbox: " << error_str; 484 DLOG_IF(FATAL, !success) << "Failed to initialize sandbox: " << error_str;
488 gSandboxIsActive = success; 485 gSandboxIsActive = success;
489 return success; 486 return success;
(...skipping 17 matching lines...) Expand all
507 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { 504 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) {
508 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " 505 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
509 << path.value(); 506 << path.value();
510 return path; 507 return path;
511 } 508 }
512 509
513 return base::FilePath(canonical_path); 510 return base::FilePath(canonical_path);
514 } 511 }
515 512
516 } // namespace content 513 } // namespace content
OLDNEW
« no previous file with comments | « content/common/cursors/webcursor_mac.mm ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698