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

Side by Side Diff: base/process_util_mac.mm

Issue 9706001: [Mac] Add the OS version check functions for 10.8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « base/mac/mac_util_unittest.mm ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/process_util.h" 5 #include "base/process_util.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <crt_externs.h> 8 #include <crt_externs.h>
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <errno.h> 10 #include <errno.h>
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 711
712 // === C++ operator new === 712 // === C++ operator new ===
713 713
714 void oom_killer_new() { 714 void oom_killer_new() {
715 debug::BreakDebugger(); 715 debug::BreakDebugger();
716 } 716 }
717 717
718 // === Core Foundation CFAllocators === 718 // === Core Foundation CFAllocators ===
719 719
720 bool CanGetContextForCFAllocator() { 720 bool CanGetContextForCFAllocator() {
721 // TODO(rsesek|avi): See mac_util.h:153 for removing/updating this.
721 return !base::mac::IsOSLaterThanLion(); 722 return !base::mac::IsOSLaterThanLion();
722 } 723 }
723 724
724 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) { 725 CFAllocatorContext* ContextForCFAllocator(CFAllocatorRef allocator) {
725 if (base::mac::IsOSLeopard() || base::mac::IsOSSnowLeopard()) { 726 if (base::mac::IsOSLeopard() || base::mac::IsOSSnowLeopard()) {
726 ChromeCFAllocatorLeopards* our_allocator = 727 ChromeCFAllocatorLeopards* our_allocator =
727 const_cast<ChromeCFAllocatorLeopards*>( 728 const_cast<ChromeCFAllocatorLeopards*>(
728 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator)); 729 reinterpret_cast<const ChromeCFAllocatorLeopards*>(allocator));
729 return &our_allocator->_context; 730 return &our_allocator->_context;
730 } else if (base::mac::IsOSLion()) { 731 } else if (base::mac::IsOSLion()) {
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 } 1144 }
1144 } 1145 }
1145 1146
1146 } // namespace 1147 } // namespace
1147 1148
1148 void EnsureProcessTerminated(ProcessHandle process) { 1149 void EnsureProcessTerminated(ProcessHandle process) {
1149 WaitForChildToDie(process, kWaitBeforeKillSeconds); 1150 WaitForChildToDie(process, kWaitBeforeKillSeconds);
1150 } 1151 }
1151 1152
1152 } // namespace base 1153 } // namespace base
OLDNEW
« no previous file with comments | « base/mac/mac_util_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698