Index: chrome/browser/download/chrome_download_manager_delegate.cc |
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc |
index cffda03ad2b7a856484b3d81265c9f8a7179a5dd..855d6f4cb42ede55af6e8188cdda7fd166582b15 100644 |
--- a/chrome/browser/download/chrome_download_manager_delegate.cc |
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc |
@@ -384,10 +384,11 @@ void ChromeDownloadManagerDelegate::OpenWithWebIntent( |
// The SuggestedFilename is not always filled in in the DownloadItem. |
// When it is, it comes from the purpose-built HTML algorithm, but |
- // in practice it is frequently just inferred. |
- string16 filename = UTF8ToUTF16(item->GetSuggestedFilename()); |
+ // in practice it is frequently just inferred. GetFileNameToReportUser |
+ // is more authoritative. |
+ string16 filename = item->GetFileNameToReportUser().LossyDisplayName(); |
Greg Billock
2012/07/23 21:42:22
So this looks right, then, and is what we decided
asanka
2012/07/23 21:45:43
Yes. GetFileNameToReportUser() is what we decided
Greg Billock
2012/07/24 20:09:47
Done.
|
if (filename.empty()) |
- filename = item->GetFileNameToReportUser().LossyDisplayName(); |
+ filename = UTF8ToUTF16(item->GetSuggestedFilename()); |
intent_data.extra_data.insert(make_pair(ASCIIToUTF16("filename"), filename)); |
content::WebIntentsDispatcher* dispatcher = |