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

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

Issue 2924433002: Change linux default hidden file save directory to XDG_DATA_HOME (Closed)
Patch Set: Use /var/tmp Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 67ea6dc5e69d015ad762896bce3ae4ce31c905ec..3c92692ad7aaed1921b1bf96e9962cb36ac1faa0 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -448,6 +448,19 @@ void ChromeDownloadManagerDelegate::GetSaveDir(
*website_save_dir = download_prefs_->SaveFilePath();
DCHECK(!website_save_dir->empty());
*download_save_dir = download_prefs_->DownloadPath();
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ // TODO(thomasanderson): Remove this when all Linux distros with
+ // versions of GTK lower than 3.14.7 are no longer supported. This
+ // should happen when support for Ubuntu Trusty and Debian Jessie
+ // are removed.
+ //
+ // Use /var/tmp instead of /tmp here because /tmp may be
+ // memory-mounted and users may want to download files larger than
+ // will fit in memory. Existence of /var/tmp is guaranteed by the
+ // Filesystem Hierarchy Standard.
+ static const char kVarTmp[] = "/var/tmp";
+ *download_save_dir = base::FilePath(kVarTmp);
qinmin 2017/06/06 22:10:14 Shouldn't this be done in download_prefs_? what if
Tom Anderson 2017/06/07 01:29:51 Done.
+#endif
*skip_dir_check = false;
#if defined(OS_CHROMEOS)
*skip_dir_check = drive::util::IsUnderDriveMountPoint(*website_save_dir);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698