summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
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/cocoa
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/cocoa')
-rw-r--r--chrome/browser/cocoa/web_drag_source.mm11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/web_drag_source.mm b/chrome/browser/cocoa/web_drag_source.mm
index 98e22af..a2402da 100644
--- a/chrome/browser/cocoa/web_drag_source.mm
+++ b/chrome/browser/cocoa/web_drag_source.mm
@@ -13,6 +13,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/browser_process.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/renderer_host/render_view_host.h"
@@ -367,11 +368,11 @@ void PromiseWriterTask::Run() {
&downloadURL_)) {
std::string contentDisposition =
"attachment; filename=" + fileName.value();
- DownloadManager::GenerateFileName(downloadURL_,
- contentDisposition,
- std::string(),
- UTF16ToUTF8(mimeType),
- &downloadFileName_);
+ download_util::GenerateFileName(downloadURL_,
+ contentDisposition,
+ std::string(),
+ UTF16ToUTF8(mimeType),
+ &downloadFileName_);
fileExtension = SysUTF8ToNSString(downloadFileName_.Extension());
}
}