Index: chrome/browser/cocoa/shell_dialogs_mac.mm |
diff --git a/chrome/browser/cocoa/shell_dialogs_mac.mm b/chrome/browser/cocoa/shell_dialogs_mac.mm |
index 7c398e138480c55d43e1a6ab6cc32531869a3519..cffa35ff450493d4c2ad661d631f9c41dbad7671 100644 |
--- a/chrome/browser/cocoa/shell_dialogs_mac.mm |
+++ b/chrome/browser/cocoa/shell_dialogs_mac.mm |
@@ -29,7 +29,7 @@ class SelectFileDialogImpl; |
} |
- (id)initWithSelectFileDialogImpl:(SelectFileDialogImpl*)s; |
-- (void)endedPanel:(NSSavePanel *)panel |
+- (void)endedPanel:(NSSavePanel*)panel |
withReturn:(int)returnCode |
context:(void *)context; |
@@ -325,7 +325,7 @@ bool SelectFileDialogImpl::ShouldEnableFilename(NSPanel* dialog, |
return self; |
} |
-- (void)endedPanel:(id)panel |
+- (void)endedPanel:(NSSavePanel*)panel |
withReturn:(int)returnCode |
context:(void *)context { |
int index = 0; |
@@ -355,7 +355,8 @@ bool SelectFileDialogImpl::ShouldEnableFilename(NSPanel* dialog, |
index = 1; |
} |
} else { |
- NSArray* filenames = [panel filenames]; |
+ CHECK([panel isKindOfClass:[NSOpenPanel class]]); |
+ NSArray* filenames = [static_cast<NSOpenPanel*>(panel) filenames]; |
for (NSString* filename in filenames) |
paths.push_back(FilePath(base::SysNSStringToUTF8(filename))); |
} |