summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 20:23:04 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 20:23:04 +0000
commit409993dec55a874e0659acf421a87070d450a262 (patch)
tree56569522458c403b04829d1ef803d5f93a888b2d /chrome/browser/download
parent32c147158f76e19aa22efa2a7b14d3f0e1e23a02 (diff)
downloadchromium_src-409993dec55a874e0659acf421a87070d450a262.zip
chromium_src-409993dec55a874e0659acf421a87070d450a262.tar.gz
chromium_src-409993dec55a874e0659acf421a87070d450a262.tar.bz2
Implement some chrome path getters for Mac OS and un-comment their uses in the download manager. Move chrome_paths_mac from a .cc to a .mm to allow Cocoa.
Review URL: http://codereview.chromium.org/39041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/download_manager.cc11
1 files changed, 0 insertions, 11 deletions
diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc
index aafb641..f46cac5 100644
--- a/chrome/browser/download/download_manager.cc
+++ b/chrome/browser/download/download_manager.cc
@@ -92,8 +92,6 @@ static int GetUniquePathNumber(const FilePath& path) {
return -1;
}
-// TODO(port): enable this for mac later. For now, it gives a not used warning.
-#if defined(OS_WIN) || defined(OS_LINUX)
static bool DownloadPathIsDangerous(const FilePath& download_path) {
FilePath desktop_dir;
if (!PathService::Get(chrome::DIR_USER_DESKTOP, &desktop_dir)) {
@@ -102,7 +100,6 @@ static bool DownloadPathIsDangerous(const FilePath& download_path) {
}
return (download_path == desktop_dir);
}
-#endif
// DownloadItem implementation -------------------------------------------------
@@ -299,8 +296,6 @@ void DownloadManager::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterStringPref(prefs::kDownloadExtensionsToOpen, L"");
prefs->RegisterBooleanPref(prefs::kDownloadDirUpgraded, false);
-// TODO(port): port the necessary bits of chrome_paths_mac.
-#if defined(OS_WIN) || defined(OS_LINUX)
// The default download path is userprofile\download.
FilePath default_download_path;
if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS,
@@ -323,7 +318,6 @@ void DownloadManager::RegisterUserPrefs(PrefService* prefs) {
}
prefs->SetBoolean(prefs::kDownloadDirUpgraded, true);
}
-#endif // defined(OS_WIN) || defined(OS_LINUX)
}
DownloadManager::DownloadManager()
@@ -486,8 +480,6 @@ bool DownloadManager::Init(Profile* profile) {
DCHECK(prefs);
prompt_for_download_.Init(prefs::kPromptForDownload, prefs, NULL);
-// TODO(port): enable this after implementing chrome_paths for mac.
-#if defined(OS_WIN) || defined(OS_LINUX)
download_path_.Init(prefs::kDownloadDefaultDirectory, prefs, NULL);
// This variable is needed to resolve which CreateDirectory we want to point
@@ -498,9 +490,6 @@ bool DownloadManager::Init(Profile* profile) {
// Ensure that the download directory specified in the preferences exists.
file_loop_->PostTask(FROM_HERE, NewRunnableFunction(
CreateDirectoryPtr, download_path()));
-#elif defined(OS_MACOSX)
- NOTIMPLEMENTED();
-#endif
#if defined(OS_WIN)
// We use this on windows to determine possibly dangerous downloads.