summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tab_contents_drag_source.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 17:14:00 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 17:14:00 +0000
commit7ba53e1db77e3cd7c9e7b05c6e44698a142beea5 (patch)
tree1610b6881ce577e7ee1048bc5e22c7f8bb9b8d9e /chrome/browser/gtk/tab_contents_drag_source.cc
parentf0f569e61980fc8077ac13012a09976f4ce5cebd (diff)
downloadchromium_src-7ba53e1db77e3cd7c9e7b05c6e44698a142beea5.zip
chromium_src-7ba53e1db77e3cd7c9e7b05c6e44698a142beea5.tar.gz
chromium_src-7ba53e1db77e3cd7c9e7b05c6e44698a142beea5.tar.bz2
Clean up download code:
- move filename generation parts and related code out of DownloadManager download_util is not the best place for it, but it's better than DownloadManager which we're trying to minimize - clean up posting tasks to different threads. There's no need to create separate methods for that, it was cluttering the file needlessly - other minor cleanups, like using static_cast instead of C-style cast TEST=unit_tests, browser_tests, ui_tests BUG=48913 Review URL: http://codereview.chromium.org/3043048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tab_contents_drag_source.cc')
-rw-r--r--chrome/browser/gtk/tab_contents_drag_source.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/gtk/tab_contents_drag_source.cc b/chrome/browser/gtk/tab_contents_drag_source.cc
index a1b5d80..1de42ed 100644
--- a/chrome/browser/gtk/tab_contents_drag_source.cc
+++ b/chrome/browser/gtk/tab_contents_drag_source.cc
@@ -10,7 +10,7 @@
#include "base/file_util.h"
#include "base/mime_util.h"
#include "base/utf_string_conversions.h"
-#include "chrome/browser/download/download_manager.h"
+#include "chrome/browser/download/download_util.h"
#include "chrome/browser/download/drag_download_file.h"
#include "chrome/browser/download/drag_download_util.h"
#include "chrome/browser/gtk/gtk_util.h"
@@ -294,11 +294,11 @@ void TabContentsDragSource::OnDragBegin(GtkWidget* sender,
std::string content_disposition("attachment; filename=");
content_disposition += download_file_name_.value();
FilePath generated_download_file_name;
- DownloadManager::GenerateFileName(download_url_,
- content_disposition,
- std::string(),
- download_mime_type,
- &generated_download_file_name);
+ download_util::GenerateFileName(download_url_,
+ content_disposition,
+ std::string(),
+ download_mime_type,
+ &generated_download_file_name);
// Pass the file name to the drop target by setting the source window's
// XdndDirectSave0 property.