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

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

Issue 2730015: Mac/clang: Uncontentious fixes. (Closed)
Patch Set: '' Created 10 years, 6 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/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)));
}

Powered by Google App Engine
This is Rietveld 408576698