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

Unified Diff: chrome/browser/cocoa/bookmark_bar_controller.mm

Issue 2762014: Mac: clang build (Closed)
Patch Set: comments Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/bookmark_bar_controller.mm
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index 9c6f8d57c1274776ae32efbaff7656a26b674800..0c7ec9d459394aa850e878637b1839ece0606b4b 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -874,7 +874,12 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
// Enable or disable items. We are the menu delegate for both the bar
// and for bookmark folder buttons.
-- (BOOL)validateUserInterfaceItem:(id)item {
+- (BOOL)validateUserInterfaceItem:(id<NSValidatedUserInterfaceItem>)anItem {
+ // NSUserInterfaceValidations says that the passed-in object has type
+ // |id<NSValidatedUserInterfaceItem>|, but this function needs to call the
+ // NSObject method -isKindOfClass: on the parameter. In theory, this is not
+ // correct, but this is probably a bug in the method signature.
+ NSMenuItem* item = static_cast<NSMenuItem*>(anItem);
// Yes for everything we don't explicitly deny.
if (![item isKindOfClass:[NSMenuItem class]])
return YES;

Powered by Google App Engine
This is Rietveld 408576698