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

Side by Side Diff: base/mac/mac_util.mm

Issue 10785047: Remove all the OS X 10.6 SDK forward declarations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 | « base/mac/cocoa_protocols.h ('k') | chrome/browser/app_controller_mac.mm » ('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 "base/mac/mac_util.h" 5 #include "base/mac/mac_util.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #import <IOKit/IOKitLib.h> 8 #import <IOKit/IOKitLib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <sys/utsname.h> 10 #include <sys/utsname.h>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (CFEqual(item_url, url)) { 88 if (CFEqual(item_url, url)) {
89 CFRetain(item); 89 CFRetain(item);
90 return item; 90 return item;
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 return NULL; 95 return NULL;
96 } 96 }
97 97
98 #if !defined(MAC_OS_X_VERSION_10_6) || \
99 MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
100 // kLSSharedFileListLoginItemHidden is supported on
101 // 10.5, but missing from the 10.5 headers.
102 // http://openradar.appspot.com/6482251
103 static NSString* kLSSharedFileListLoginItemHidden =
104 @"com.apple.loginitem.HideOnLaunch";
105 #endif
106
107 bool IsHiddenLoginItem(LSSharedFileListItemRef item) { 98 bool IsHiddenLoginItem(LSSharedFileListItemRef item) {
108 ScopedCFTypeRef<CFBooleanRef> hidden(reinterpret_cast<CFBooleanRef>( 99 ScopedCFTypeRef<CFBooleanRef> hidden(reinterpret_cast<CFBooleanRef>(
109 LSSharedFileListItemCopyProperty(item, 100 LSSharedFileListItemCopyProperty(item,
110 reinterpret_cast<CFStringRef>(kLSSharedFileListLoginItemHidden)))); 101 reinterpret_cast<CFStringRef>(kLSSharedFileListLoginItemHidden))));
111 102
112 return hidden && hidden == kCFBooleanTrue; 103 return hidden && hidden == kCFBooleanTrue;
113 } 104 }
114 105
115 } // namespace 106 } // namespace
116 107
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp)) 682 StringPiece(begin + comma_loc + 1, ident.end()), &minor_tmp))
692 return false; 683 return false;
693 *type = ident.substr(0, number_loc); 684 *type = ident.substr(0, number_loc);
694 *major = major_tmp; 685 *major = major_tmp;
695 *minor = minor_tmp; 686 *minor = minor_tmp;
696 return true; 687 return true;
697 } 688 }
698 689
699 } // namespace mac 690 } // namespace mac
700 } // namespace base 691 } // namespace base
OLDNEW
« no previous file with comments | « base/mac/cocoa_protocols.h ('k') | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698