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

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

Issue 16533: Convert download manager to FilePath. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « chrome/browser/download/save_file.cc ('k') | chrome/browser/history/download_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_package.cc
===================================================================
--- chrome/browser/download/save_package.cc (revision 7599)
+++ chrome/browser/download/save_package.cc (working copy)
@@ -177,8 +177,9 @@
}
// Create the fake DownloadItem and display the view.
- download_ = new DownloadItem(1, saved_main_file_path_, 0, page_url_,
- std::wstring(), Time::Now(), 0, -1, -1, false);
+ download_ = new DownloadItem(1,
+ FilePath::FromWStringHack(saved_main_file_path_), 0, page_url_,
+ FilePath(), Time::Now(), 0, -1, -1, false);
download_->set_manager(web_contents_->profile()->GetDownloadManager());
DownloadShelfView* shelf = web_contents_->GetDownloadShelfView();
shelf->AddDownloadView(new DownloadItemView(
@@ -951,8 +952,9 @@
DCHECK(download_manager);
// Ensure the filename is safe.
- download_manager->GenerateSafeFilename(param->current_tab_mime_type,
- &param->saved_main_file_path);
+ FilePath path;
+ download_manager->GenerateSafeFilename(param->current_tab_mime_type, &path);
+ param->saved_main_file_path = path.ToWStringHack();
// The option index is not zero-based.
DCHECK(index > 0 && index < 3);
« no previous file with comments | « chrome/browser/download/save_file.cc ('k') | chrome/browser/history/download_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698