summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/download/download_file.cc7
-rw-r--r--chrome/common/platform_util_mac.mm3
2 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc
index 7be3411..8731b53 100644
--- a/chrome/browser/download/download_file.cc
+++ b/chrome/browser/download/download_file.cc
@@ -544,8 +544,13 @@ void DownloadFileManager::OnOpenDownloadInShell(const FilePath& full_path,
} else {
win_util::OpenItemViaShell(full_path);
}
+#elif defined(OS_MACOSX)
+ // Quarantine takes care of asking the user about dangerous files, so we can
+ // just open it.
+ platform_util::OpenItem(full_path);
#else
- // TODO(port) implement me.
+ // TODO(port) implement me. (Does Linux need to use a "safe" open, or can it
+ // just share the Mac call to platform_util?)
NOTIMPLEMENTED();
#endif
}
diff --git a/chrome/common/platform_util_mac.mm b/chrome/common/platform_util_mac.mm
index c3a4ab7..41ca53b 100644
--- a/chrome/common/platform_util_mac.mm
+++ b/chrome/common/platform_util_mac.mm
@@ -22,7 +22,8 @@ void ShowItemInFolder(const FilePath& full_path) {
}
void OpenItem(const FilePath& full_path) {
- NOTIMPLEMENTED();
+ NSString* path_string = base::SysUTF8ToNSString(full_path.value());
+ [[NSWorkspace sharedWorkspace] openFile:path_string];
}
gfx::NativeWindow GetTopLevel(gfx::NativeView view) {