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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 10802056: Switch default filename retrieval to use GetFielNameToReportUser, which is more authoritative. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698