summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-20 23:12:24 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-20 23:12:24 +0000
commitd3ac5632bf3c69051bd3d58a890aed3ebc1028c6 (patch)
tree1973716e53862ddb6a9b9717dee8cf28c109e41d
parent2ba060ff3309507eb854cbd117d2798707c4009a (diff)
downloadchromium_src-d3ac5632bf3c69051bd3d58a890aed3ebc1028c6.zip
chromium_src-d3ac5632bf3c69051bd3d58a890aed3ebc1028c6.tar.gz
chromium_src-d3ac5632bf3c69051bd3d58a890aed3ebc1028c6.tar.bz2
mac: Remove code that was only needed on 10.5
BUG=137676 TEST=none Review URL: https://chromiumcodereview.appspot.com/10807052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147738 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/mac/dock.mm67
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/hover_button.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h6
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm67
-rw-r--r--chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tracking_area.h9
-rw-r--r--chrome/browser/ui/cocoa/tracking_area.mm23
-rw-r--r--chrome/browser/ui/cocoa/tracking_area_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm12
-rw-r--r--chrome/browser/ui/panels/panel_window_controller_cocoa.mm5
-rw-r--r--content/browser/renderer_host/backing_store_mac.mm22
-rw-r--r--content/common/common.sb2
-rw-r--r--content/common/sandbox_mac.mm16
-rw-r--r--content/ppapi_plugin/ppapi.sb4
-rw-r--r--content/renderer/renderer.sb4
-rw-r--r--net/base/cert_verify_proc_unittest.cc2
-rw-r--r--sync/util/get_session_name_mac.mm26
20 files changed, 33 insertions, 246 deletions
diff --git a/chrome/browser/mac/dock.mm b/chrome/browser/mac/dock.mm
index 1256b17b..1dce41ee 100644
--- a/chrome/browser/mac/dock.mm
+++ b/chrome/browser/mac/dock.mm
@@ -120,71 +120,12 @@ NSMutableArray* PersistentAppPaths(NSArray* persistent_apps) {
return app_paths;
}
-// Returns the process ID for a process whose bundle identifier is bundle_id.
-// The process is looked up using the Process Manager. Returns -1 on error,
-// including when no process matches the bundle identifier.
-pid_t PIDForProcessBundleID(const std::string& bundle_id) {
- // This technique is racy: what happens if |psn| becomes invalid before a
- // subsequent call to GetNextProcess, or if the Process Manager's internal
- // order of processes changes? Tolerate the race by allowing failure. Since
- // this function is only used on Leopard to find the Dock process so that it
- // can be restarted, the worst that can happen here is that the Dock won't
- // be restarted.
- ProcessSerialNumber psn = {0, kNoProcess};
- OSStatus status;
- while ((status = GetNextProcess(&psn)) == noErr) {
- pid_t process_pid;
- if ((status = GetProcessPID(&psn, &process_pid)) != noErr) {
- OSSTATUS_LOG(ERROR, status) << "GetProcessPID";
- continue;
- }
-
- base::mac::ScopedCFTypeRef<CFDictionaryRef> process_dictionary(
- ProcessInformationCopyDictionary(&psn,
- kProcessDictionaryIncludeAllInformationMask));
- if (!process_dictionary.get()) {
- LOG(ERROR) << "ProcessInformationCopyDictionary";
- continue;
- }
-
- CFStringRef process_bundle_id_cf = base::mac::CFCast<CFStringRef>(
- CFDictionaryGetValue(process_dictionary, kCFBundleIdentifierKey));
- if (!process_bundle_id_cf) {
- // Not all processes have a bundle ID.
- continue;
- }
-
- std::string process_bundle_id =
- base::SysCFStringRefToUTF8(process_bundle_id_cf);
- if (process_bundle_id == bundle_id) {
- // Found it!
- return process_pid;
- }
- }
-
- // status will be procNotFound (-600) if the process wasn't found.
- OSSTATUS_LOG(ERROR, status) << "GetNextProcess";
-
- return -1;
-}
-
// Restart the Dock process by sending it a SIGHUP.
void Restart() {
- pid_t pid;
-
- if (base::mac::IsOSSnowLeopardOrLater()) {
- // Doing this via launchd using the proper job label is the safest way to
- // handle the restart. Unlike "killall Dock", looking this up via launchd
- // guarantees that only the right process will be targeted.
- pid = base::mac::PIDForJob("com.apple.Dock.agent");
- } else {
- // On Leopard, the Dock doesn't have a known fixed job label name as it
- // does on Snow Leopard and Lion because it's not launched as a launch
- // agent. Look the PID up by finding a process with the expected bundle
- // identifier using the Process Manager.
- pid = PIDForProcessBundleID("com.apple.dock");
- }
-
+ // Doing this via launchd using the proper job label is the safest way to
+ // handle the restart. Unlike "killall Dock", looking this up via launchd
+ // guarantees that only the right process will be targeted.
+ pid_t pid = base::mac::PIDForJob("com.apple.Dock.agent");
if (pid <= 0) {
return;
}
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
index 6939493..67c7fb4 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
@@ -1059,7 +1059,7 @@ struct LayoutMetrics {
NSTrackingActiveAlways |
NSTrackingEnabledDuringMouseDrag
)
- proxiedOwner:self
+ owner:self
userInfo:nil]);
[view addTrackingArea:scrollTrackingArea_.get()];
}
diff --git a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
index ba997e1..f8024c2 100644
--- a/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/browser/avatar_menu_bubble_controller.mm
@@ -438,7 +438,7 @@ const CGFloat kLabelInset = 49.0;
[[CrTrackingArea alloc] initWithRect:[self bounds]
options:NSTrackingMouseEnteredAndExited |
NSTrackingActiveInKeyWindow
- proxiedOwner:self
+ owner:self
userInfo:nil]);
[self addTrackingArea:trackingArea_.get()];
diff --git a/chrome/browser/ui/cocoa/hover_button.mm b/chrome/browser/ui/cocoa/hover_button.mm
index 485585d..28ab72c 100644
--- a/chrome/browser/ui/cocoa/hover_button.mm
+++ b/chrome/browser/ui/cocoa/hover_button.mm
@@ -61,7 +61,7 @@
[[CrTrackingArea alloc] initWithRect:[self bounds]
options:NSTrackingMouseEnteredAndExited |
NSTrackingActiveAlways
- proxiedOwner:self
+ owner:self
userInfo:nil]);
[self addTrackingArea:trackingArea_.get()];
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index ef20292..a36fc34 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -395,7 +395,7 @@ private:
[[CrTrackingArea alloc] initWithRect:[newTabButton_ bounds]
options:(NSTrackingMouseEnteredAndExited |
NSTrackingActiveAlways)
- proxiedOwner:self
+ owner:self
userInfo:nil]);
if (browserWindow) // Nil for Browsers without a tab strip (e.g. popups).
[newTabTrackingArea_ clearOwnerWhenWindowWillClose:browserWindow];
@@ -429,7 +429,7 @@ private:
NSTrackingMouseMoved |
NSTrackingActiveAlways |
NSTrackingInVisibleRect
- proxiedOwner:self
+ owner:self
userInfo:nil]);
if (browserWindow) // Nil for Browsers without a tab strip (e.g. popups).
[trackingArea_ clearOwnerWhenWindowWillClose:browserWindow];
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h
index aad351a..e2d960e 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.h
@@ -55,12 +55,6 @@
TabWindowController* draggedController_; // Weak. Controller being dragged.
NSWindow* dragWindow_; // Weak. The window being dragged
NSWindow* dragOverlay_; // Weak. The overlay being dragged
- // Cache workspace IDs per-drag because computing them on 10.5 with
- // CGWindowListCreateDescriptionFromArray is expensive.
- // resetDragControllers clears this cache.
- //
- // TODO(davidben): When 10.5 becomes unsupported, remove this.
- std::map<CGWindowID, int> workspaceIDCache_;
TabWindowController* targetController_; // weak. Controller being targeted
}
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
index a7dfe11..29906e8 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
@@ -40,8 +40,6 @@ const NSTimeInterval kTearDuration = 0.333;
- (void)setWindowBackgroundVisibility:(BOOL)shouldBeVisible;
- (void)endDrag:(NSEvent*)event;
- (void)continueDrag:(NSEvent*)event;
-// TODO(davidben): When we stop supporting 10.5, this can be removed.
-- (int)getWorkspaceID:(NSWindow*)window useCache:(BOOL)useCache;
@end
////////////////////////////////////////////////////////////////////////////////
@@ -442,7 +440,6 @@ const NSTimeInterval kTearDuration = 0.333;
sourceController_ = nil;
sourceWindow_ = nil;
targetController_ = nil;
- workspaceIDCache_.clear();
}
// Returns an array of controllers that could be a drop target, ordered front to
@@ -455,19 +452,8 @@ const NSTimeInterval kTearDuration = 0.333;
if (window == dragWindow) continue;
if (![window isVisible]) continue;
// Skip windows on the wrong space.
- if ([window respondsToSelector:@selector(isOnActiveSpace)]) {
- if (![window performSelector:@selector(isOnActiveSpace)])
- continue;
- } else {
- // TODO(davidben): When we stop supporting 10.5, this can be
- // removed.
- //
- // We don't cache the workspace of |dragWindow| because it may
- // move around spaces.
- if ([self getWorkspaceID:dragWindow useCache:NO] !=
- [self getWorkspaceID:window useCache:YES])
- continue;
- }
+ if (![window isOnActiveSpace])
+ continue;
NSWindowController* controller = [window windowController];
if ([controller isKindOfClass:[TabWindowController class]]) {
TabWindowController* realController =
@@ -505,53 +491,4 @@ const NSTimeInterval kTearDuration = 0.333;
chromeIsVisible_ = shouldBeVisible;
}
-// Returns the workspace id of |window|. If |useCache|, then lookup
-// and remember the value in |workspaceIDCache_| until the end of the
-// current drag.
-- (int)getWorkspaceID:(NSWindow*)window useCache:(BOOL)useCache {
- CGWindowID windowID = [window windowNumber];
- if (useCache) {
- std::map<CGWindowID, int>::iterator iter =
- workspaceIDCache_.find(windowID);
- if (iter != workspaceIDCache_.end())
- return iter->second;
- }
-
- int workspace = -1;
- // It's possible to query in bulk, but probably not necessary.
- base::mac::ScopedCFTypeRef<CFArrayRef> windowIDs(CFArrayCreate(
- NULL, reinterpret_cast<const void **>(&windowID), 1, NULL));
- base::mac::ScopedCFTypeRef<CFArrayRef> descriptions(
- CGWindowListCreateDescriptionFromArray(windowIDs));
- DCHECK(CFArrayGetCount(descriptions.get()) <= 1);
- if (CFArrayGetCount(descriptions.get()) > 0) {
- CFDictionaryRef dict = static_cast<CFDictionaryRef>(
- CFArrayGetValueAtIndex(descriptions.get(), 0));
- DCHECK(CFGetTypeID(dict) == CFDictionaryGetTypeID());
-
- // Sanity check the ID.
- CFNumberRef otherIDRef =
- base::mac::GetValueFromDictionary<CFNumberRef>(dict, kCGWindowNumber);
- CGWindowID otherID;
- if (otherIDRef &&
- CFNumberGetValue(otherIDRef, kCGWindowIDCFNumberType, &otherID) &&
- otherID == windowID) {
- // And then get the workspace.
- CFNumberRef workspaceRef =
- base::mac::GetValueFromDictionary<CFNumberRef>(dict,
- kCGWindowWorkspace);
- if (!workspaceRef ||
- !CFNumberGetValue(workspaceRef, kCFNumberIntType, &workspace)) {
- workspace = -1;
- }
- } else {
- NOTREACHED();
- }
- }
- if (useCache) {
- workspaceIDCache_[windowID] = workspace;
- }
- return workspace;
-}
-
@end
diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
index 1f98775..9fab60d 100644
--- a/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm
@@ -305,7 +305,7 @@ class NotificationBridge : public content::NotificationObserver {
NSTrackingInVisibleRect |
NSTrackingMouseEnteredAndExited |
NSTrackingActiveAlways
- proxiedOwner:self
+ owner:self
userInfo:nil]);
NSView* toolbarView = [self view];
[toolbarView addTrackingArea:trackingArea_.get()];
diff --git a/chrome/browser/ui/cocoa/tracking_area.h b/chrome/browser/ui/cocoa/tracking_area.h
index b044e4d..a1036ea 100644
--- a/chrome/browser/ui/cocoa/tracking_area.h
+++ b/chrome/browser/ui/cocoa/tracking_area.h
@@ -20,16 +20,9 @@
// Designated initializer. Forwards all arguments to the superclass, but wraps
// |owner| in a proxy object.
-//
-// The |proxiedOwner:| paramater has been renamed due to an incompatiblity with
-// the 10.5 SDK. Since that SDK version declares |-[NSTrackingArea's init...]|'s
-// return type to be |NSTrackingArea*| rather than |id|, a more generalized type
-// can't be returned by the subclass. Until the project switches to the 10.6 SDK
-// (where Apple changed the return type to |id|), this ugly hack must exist.
-// TODO(rsesek): Remove this when feasabile.
- (id)initWithRect:(NSRect)rect
options:(NSTrackingAreaOptions)options
- proxiedOwner:(id)owner // 10.5 SDK hack. Remove at some point.
+ owner:(id)owner
userInfo:(NSDictionary*)userInfo;
// Prevents any future messages from being delivered to the |owner|.
diff --git a/chrome/browser/ui/cocoa/tracking_area.mm b/chrome/browser/ui/cocoa/tracking_area.mm
index ac638b8..004695b 100644
--- a/chrome/browser/ui/cocoa/tracking_area.mm
+++ b/chrome/browser/ui/cocoa/tracking_area.mm
@@ -68,29 +68,20 @@
@implementation CrTrackingArea
- (id)initWithRect:(NSRect)rect
- options:(NSTrackingAreaOptions)options
- proxiedOwner:(id)owner
- userInfo:(NSDictionary*)userInfo {
+ options:(NSTrackingAreaOptions)options
+ owner:(id)owner
+ userInfo:(NSDictionary*)userInfo {
scoped_nsobject<CrTrackingAreaOwnerProxy> ownerProxy(
[[CrTrackingAreaOwnerProxy alloc] initWithOwner:owner]);
- if ((self = static_cast<id>([super initWithRect:rect
- options:options
- owner:ownerProxy.get()
- userInfo:userInfo]))) {
+ if ((self = [super initWithRect:rect
+ options:options
+ owner:ownerProxy.get()
+ userInfo:userInfo])) {
ownerProxy_.swap(ownerProxy);
}
return self;
}
-- (NSTrackingArea*)initWithRect:(NSRect)rect
- options:(NSTrackingAreaOptions)options
- owner:(id)owner
- userInfo:(NSDictionary*)userInfo {
- [NSException raise:@"org.chromium.CrTrackingArea"
- format:@"Cannot init a CrTrackingArea with NSTrackingArea's initializer"];
- return nil;
-}
-
- (void)dealloc {
[self clearOwner];
[[NSNotificationCenter defaultCenter] removeObserver:self];
diff --git a/chrome/browser/ui/cocoa/tracking_area_unittest.mm b/chrome/browser/ui/cocoa/tracking_area_unittest.mm
index 63e8a88..27e572d 100644
--- a/chrome/browser/ui/cocoa/tracking_area_unittest.mm
+++ b/chrome/browser/ui/cocoa/tracking_area_unittest.mm
@@ -29,7 +29,7 @@ class CrTrackingAreaTest : public CocoaTest {
trackingArea_([[CrTrackingArea alloc]
initWithRect:NSMakeRect(0, 0, 100, 100)
options:NSTrackingMouseMoved | NSTrackingActiveInKeyWindow
- proxiedOwner:owner_.get()
+ owner:owner_.get()
userInfo:nil]) {
}
diff --git a/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm b/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm
index e3e4fc1..e466038 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm
+++ b/chrome/browser/ui/cocoa/wrench_menu/menu_tracked_button.mm
@@ -10,7 +10,6 @@
- (void)doHighlight:(BOOL)highlight;
- (void)checkMouseInRect;
- (NSRect)insetBounds;
-- (BOOL)shouldHighlightOnHover;
@end
@implementation MenuTrackedButton
@@ -58,7 +57,7 @@
// smallest that still produces the effect while minimizing jank. Smaller
// values make the selector fire too close to immediately/now for the mouse to
// have moved off the receiver, and larger values produce lag.
- if (tracking_ && [self shouldHighlightOnHover]) {
+ if (tracking_) {
[self performSelector:@selector(checkMouseInRect)
withObject:nil
afterDelay:0.05
@@ -77,9 +76,6 @@
}
- (void)doHighlight:(BOOL)highlight {
- if (![self shouldHighlightOnHover]) {
- return;
- }
[[self cell] setHighlighted:highlight];
[self setNeedsDisplay];
}
@@ -103,10 +99,4 @@
return NSInsetRect([self bounds], 2, 1);
}
-- (BOOL)shouldHighlightOnHover {
- // There's a cell drawing bug in 10.5 that was fixed on 10.6. Hover states
- // look terrible due to this, so disable highlighting on 10.5.
- return base::mac::IsOSSnowLeopardOrLater();
-}
-
@end
diff --git a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
index c86cf9f6..c5dad1a 100644
--- a/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_window_controller_cocoa.mm
@@ -459,10 +459,7 @@ const double kDragThreshold = 3.0;
[self updateWindowLevel];
- if (base::mac::IsOSSnowLeopardOrLater()) {
- [window setCollectionBehavior:
- NSWindowCollectionBehaviorParticipatesInCycle];
- }
+ [window setCollectionBehavior:NSWindowCollectionBehaviorParticipatesInCycle];
[titlebar_view_ attach];
diff --git a/content/browser/renderer_host/backing_store_mac.mm b/content/browser/renderer_host/backing_store_mac.mm
index ebc0c0d..a00788b 100644
--- a/content/browser/renderer_host/backing_store_mac.mm
+++ b/content/browser/renderer_host/backing_store_mac.mm
@@ -180,24 +180,7 @@ void BackingStoreMac::ScrollBackingStore(int dx, int dy,
if ((dx || dy) && abs(dx) < size().width() && abs(dy) < size().height()) {
if (cg_layer()) {
- // Whether this version of OS X has broken CGLayers. See
- // http://crbug.com/45553 , comments 5 and 6.
- bool needs_layer_workaround = base::mac::IsOSLeopardOrEarlier();
-
- base::mac::ScopedCFTypeRef<CGLayerRef> new_layer;
- CGContextRef layer;
-
- if (needs_layer_workaround) {
- new_layer.reset(CreateCGLayer());
- // If the current view is in a window, the replacement must be too.
- DCHECK(new_layer);
-
- layer = CGLayerGetContext(new_layer);
- CGContextDrawLayerAtPoint(layer, CGPointMake(0, 0), cg_layer());
- } else {
- layer = CGLayerGetContext(cg_layer());
- }
-
+ CGContextRef layer = CGLayerGetContext(cg_layer());
CGContextSaveGState(layer);
CGContextClipToRect(layer,
CGRectMake(clip_rect.x(),
@@ -206,9 +189,6 @@ void BackingStoreMac::ScrollBackingStore(int dx, int dy,
clip_rect.height()));
CGContextDrawLayerAtPoint(layer, CGPointMake(dx, -dy), cg_layer());
CGContextRestoreGState(layer);
-
- if (needs_layer_workaround)
- cg_layer_.swap(new_layer);
} else {
// We don't have a layer, so scroll the contents of the CGBitmapContext.
base::mac::ScopedCFTypeRef<CGImageRef> bitmap_image(
diff --git a/content/common/common.sb b/content/common/common.sb
index 958bbb6..b19528a 100644
--- a/content/common/common.sb
+++ b/content/common/common.sb
@@ -33,7 +33,7 @@
(regex #"^/System/Library/CoreServices($|/)")) ; 10.5.6
; Needed for IPC on 10.6
-;10.6_OR_ABOVE (allow ipc-posix-shm)
+(allow ipc-posix-shm)
; Component build workaround for a dyld bug, used on OS X <= 10.6.
; Enables reading file metadata for the Chrome bundle and its parent paths.
diff --git a/content/common/sandbox_mac.mm b/content/common/sandbox_mac.mm
index 26cad6e..105340e 100644
--- a/content/common/sandbox_mac.mm
+++ b/content/common/sandbox_mac.mm
@@ -410,7 +410,7 @@ bool Sandbox::PostProcessSandboxProfile(
std::string *final_sandbox_profile_str) {
NSString* sandbox_data = [[sandbox_template copy] autorelease];
- // Remove comments, e.g. ;10.6_ONLY .
+ // Remove comments, e.g. ;10.7_OR_ABOVE .
for (NSString* to_remove in comments_to_remove) {
sandbox_data = [sandbox_data stringByReplacingOccurrencesOfString:to_remove
withString:@""];
@@ -515,13 +515,11 @@ bool Sandbox::EnableSandbox(int sandbox_type,
[tokens_to_remove addObject:@";ENABLE_LOGGING"];
}
- bool snow_leopard_or_later = base::mac::IsOSSnowLeopardOrLater();
bool lion_or_later = base::mac::IsOSLionOrLater();
// Without this, the sandbox will print a message to the system log every
- // time it denies a request. This floods the console with useless spew. The
- // (with no-log) syntax is only supported on 10.6+
- if (snow_leopard_or_later && !enable_logging) {
+ // time it denies a request. This floods the console with useless spew.
+ if (!enable_logging) {
substitutions["DISABLE_SANDBOX_DENIAL_LOGGING"] =
SandboxSubstring("(with no-log)");
} else {
@@ -543,14 +541,6 @@ bool Sandbox::EnableSandbox(int sandbox_type,
[tokens_to_remove addObject:@";10.7_OR_ABOVE"];
}
- if (snow_leopard_or_later) {
- // >=10.6 Sandbox rules.
- [tokens_to_remove addObject:@";10.6_OR_ABOVE"];
- } else {
- // Sandbox rules only for versions before 10.6.
- [tokens_to_remove addObject:@";BEFORE_10.6"];
- }
-
substitutions["COMPONENT_BUILD_WORKAROUND"] = SandboxSubstring("");
#if defined(COMPONENT_BUILD)
// dlopen() fails without file-read-metadata access if the executable image
diff --git a/content/ppapi_plugin/ppapi.sb b/content/ppapi_plugin/ppapi.sb
index 6e8fa56..f87be9d 100644
--- a/content/ppapi_plugin/ppapi.sb
+++ b/content/ppapi_plugin/ppapi.sb
@@ -14,10 +14,10 @@
; on 10.5 this is needed for the PDF plugin.
(allow file-read* (regex #"^/Library/Fonts($|/)"))
(allow mach-lookup (global-name "com.apple.FontObjectsServer")) ; 10.5.6
-;10.6_OR_ABOVE (allow mach-lookup (global-name "com.apple.FontServer")) ; 10.6
+(allow mach-lookup (global-name "com.apple.FontServer")) ; 10.6
; http://crbug.com/11269
-;10.6_OR_ABOVE (allow file-read* (subpath "@USER_HOMEDIR_AS_LITERAL@/Library/Fonts")) ; 10.6
+(allow file-read* (subpath "@USER_HOMEDIR_AS_LITERAL@/Library/Fonts")) ; 10.6
; Bits of Adobe Flash wish to open /dev/urandom directly rather than
; using our cached file descriptor.
diff --git a/content/renderer/renderer.sb b/content/renderer/renderer.sb
index 25dc100..cbe4e1a 100644
--- a/content/renderer/renderer.sb
+++ b/content/renderer/renderer.sb
@@ -12,7 +12,7 @@
; on 10.5 this is needed for the PDF plugin.
(allow file-read* (regex #"^/Library/Fonts($|/)"))
(allow mach-lookup (global-name "com.apple.FontObjectsServer")) ; 10.5.6
-;10.6_OR_ABOVE (allow mach-lookup (global-name "com.apple.FontServer")) ; 10.6
+(allow mach-lookup (global-name "com.apple.FontServer")) ; 10.6
(allow file-read*
(regex #"^/System/Library/ColorSync($|/)") ; 10.5.6 - http://crbug.com/46648
@@ -21,7 +21,7 @@
)
; http://crbug.com/11269
-;10.6_OR_ABOVE (allow file-read* (subpath "@USER_HOMEDIR_AS_LITERAL@/Library/Fonts")) ; 10.6
+(allow file-read* (subpath "@USER_HOMEDIR_AS_LITERAL@/Library/Fonts")) ; 10.6
; http://crbug.com/60917
(allow file-read-metadata
diff --git a/net/base/cert_verify_proc_unittest.cc b/net/base/cert_verify_proc_unittest.cc
index dbcf068..7899904 100644
--- a/net/base/cert_verify_proc_unittest.cc
+++ b/net/base/cert_verify_proc_unittest.cc
@@ -254,8 +254,6 @@ TEST_F(CertVerifyProcTest, RejectWeakKeys) {
bool use_ecdsa = true;
#if defined(OS_WIN)
use_ecdsa = base::win::GetVersion() > base::win::VERSION_XP;
-#elif defined(OS_MACOSX)
- use_ecdsa = base::mac::IsOSSnowLeopardOrLater();
#endif
if (use_ecdsa)
diff --git a/sync/util/get_session_name_mac.mm b/sync/util/get_session_name_mac.mm
index 6298604..e7d29c4 100644
--- a/sync/util/get_session_name_mac.mm
+++ b/sync/util/get_session_name_mac.mm
@@ -15,36 +15,12 @@
#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
-@interface NSHost(SnowLeopardAPI)
-- (NSString*)localizedName;
-@end
-
namespace syncer {
namespace internal {
std::string GetHardwareModelName() {
NSHost* myHost = [NSHost currentHost];
- if ([myHost respondsToSelector:@selector(localizedName)])
- return base::SysNSStringToUTF8([myHost localizedName]);
-
- // Fallback for 10.5
- scoped_nsobject<NSString> computerName(base::mac::CFToNSCast(
- SCDynamicStoreCopyComputerName(NULL, NULL)));
- if (computerName.get() != NULL)
- return base::SysNSStringToUTF8(computerName.get());
-
- // If all else fails, return to using a slightly nicer version of the
- // hardware model.
- char modelBuffer[256];
- size_t length = sizeof(modelBuffer);
- if (!sysctlbyname("hw.model", modelBuffer, &length, NULL, 0)) {
- for (size_t i = 0; i < length; i++) {
- if (IsAsciiDigit(modelBuffer[i]))
- return std::string(modelBuffer, 0, i);
- }
- return std::string(modelBuffer, 0, length);
- }
- return "Unknown";
+ return base::SysNSStringToUTF8([myHost localizedName]);
}
} // namespace internal