summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_file.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-22 01:21:56 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-22 01:21:56 +0000
commitb7f0588eacdc379330d315c68b749130d1f2ed2f (patch)
tree1d087bb1dc96d8d5262e3dee94861c0f7be7a89e /chrome/browser/download/download_file.cc
parent4c603f01f34867e3b908a1834e5a60b6f8a21924 (diff)
downloadchromium_src-b7f0588eacdc379330d315c68b749130d1f2ed2f.zip
chromium_src-b7f0588eacdc379330d315c68b749130d1f2ed2f.tar.gz
chromium_src-b7f0588eacdc379330d315c68b749130d1f2ed2f.tar.bz2
Bring download_file, download_manager into POSIX build.
Also shuffle a bunch of headers. Review URL: http://codereview.chromium.org/27024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10155 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_file.cc')
-rw-r--r--chrome/browser/download/download_file.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc
index 7d03acb..dbd632c 100644
--- a/chrome/browser/download/download_file.cc
+++ b/chrome/browser/download/download_file.cc
@@ -11,7 +11,6 @@
#include "base/task.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/profile.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/tab_contents/tab_util.h"
@@ -90,6 +89,7 @@ void DownloadFile::Cancel() {
// The UI has provided us with our finalized name.
bool DownloadFile::Rename(const FilePath& new_path) {
+#if defined(OS_WIN)
Close();
// We cannot rename because rename will keep the same security descriptor
@@ -111,6 +111,11 @@ bool DownloadFile::Rename(const FilePath& new_path) {
if (!Open("a+b"))
return false;
return true;
+#elif defined(OS_POSIX)
+ // TODO(port): Port this function to posix (we need file_util::Rename()).
+ NOTIMPLEMENTED();
+ return false;
+#endif
}
void DownloadFile::Close() {