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

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

Issue 3043048: Clean up download code: (Closed)
Patch Set: Created 10 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 | « chrome/browser/download/download_util_unittest.cc ('k') | chrome/browser/gtk/tab_contents_drag_source.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
diff --git a/chrome/browser/download/save_package.cc b/chrome/browser/download/save_package.cc
index 3ec45b9d1b41d4bd85395364a838e0c02fe5f366..993d533f8a7989d0868639167328ab0689d1af8d 100644
--- a/chrome/browser/download/save_package.cc
+++ b/chrome/browser/download/save_package.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/download/download_item_model.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/download/download_shelf.h"
+#include "chrome/browser/download/download_util.h"
#include "chrome/browser/download/save_file.h"
#include "chrome/browser/download/save_file_manager.h"
#include "chrome/browser/download/save_item.h"
@@ -1308,10 +1309,8 @@ void SavePackage::ContinueSave(SavePackageParam* param,
int index) {
// Ensure the filename is safe.
param->saved_main_file_path = final_name;
- DownloadManager* dlm = tab_contents_->profile()->GetDownloadManager();
- DCHECK(dlm);
- dlm->GenerateSafeFileName(param->current_tab_mime_type,
- &param->saved_main_file_path);
+ download_util::GenerateSafeFileName(param->current_tab_mime_type,
+ &param->saved_main_file_path);
// The option index is not zero-based.
DCHECK(index > 0 && index < 3);
« no previous file with comments | « chrome/browser/download/download_util_unittest.cc ('k') | chrome/browser/gtk/tab_contents_drag_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698