summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 17:57:54 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-23 17:57:54 +0000
commit5968af3021ae91fe1cac7467762a1ffcb377499b (patch)
tree57935b0c41d271a0bdd78060bd8c51e6bc525dd0 /chrome
parent12037ed42a8a72539046078d5e486af672174b86 (diff)
downloadchromium_src-5968af3021ae91fe1cac7467762a1ffcb377499b.zip
chromium_src-5968af3021ae91fe1cac7467762a1ffcb377499b.tar.gz
chromium_src-5968af3021ae91fe1cac7467762a1ffcb377499b.tar.bz2
Call FNNotify on download complete; this should help apps watching the downloads folder.
BUG=none TEST=If Transmission is watching the Downloads folder, it should catch a completed download immediately. Review URL: http://codereview.chromium.org/437006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/cocoa/download_util_mac.mm9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/download_util_mac.mm b/chrome/browser/cocoa/download_util_mac.mm
index 8eb9a62..479ab7f 100644
--- a/chrome/browser/cocoa/download_util_mac.mm
+++ b/chrome/browser/cocoa/download_util_mac.mm
@@ -23,9 +23,16 @@ void AddFileToPasteboard(NSPasteboard* pasteboard, const FilePath& path) {
}
void NotifySystemOfDownloadComplete(const FilePath& path) {
+ NSString* filePath = base::SysUTF8ToNSString(path.value());
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName:@"com.apple.DownloadFileFinished"
- object:base::SysUTF8ToNSString(path.value())];
+ object:filePath];
+
+ NSString* parentPath = [filePath stringByDeletingLastPathComponent];
+ FNNotifyByPath(
+ reinterpret_cast<const UInt8*>([parentPath fileSystemRepresentation]),
+ kFNDirectoryModifiedMessage,
+ kNilOptions);
}
void DragDownload(const DownloadItem* download,