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

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

Issue 2924433002: Change linux default hidden file save directory to XDG_DATA_HOME (Closed)
Patch Set: Use XDG_CONFIG_HOME 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 | chrome/browser/shell_integration_linux.cc » ('j') | chrome/browser/shell_integration_linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_prefs.cc
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
index 9a3b2dea14abf0f6e91355c90d2534d880322cd8..f368c7b33d7c220acf88fe99eaf68a34558101ee 100644
--- a/chrome/browser/download/download_prefs.cc
+++ b/chrome/browser/download/download_prefs.cc
@@ -34,6 +34,10 @@
#include "content/public/browser/download_manager.h"
#include "content/public/browser/save_page_type.h"
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#include "chrome/browser/shell_integration_linux.h"
+#endif
+
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#include "chrome/browser/chromeos/drive/file_system_util.h"
@@ -255,6 +259,13 @@ base::FilePath DownloadPrefs::DownloadPath() const {
if (!integration_service || !integration_service->is_enabled())
return GetDefaultDownloadDirectoryForProfile();
}
+#elif defined(OS_LINUX)
+ // TODO(thomasanderson): Remove this when all Linux distros with
qinmin 2017/06/07 14:21:18 This logic would override the |download_path_| set
Tom Anderson 2017/06/07 18:38:38 oops.. done. Hopefully this will fix the test fail
+ // 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.
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
+ return shell_integration_linux::GetDataWriteLocation(env.get());
#endif
return *download_path_;
}
« no previous file with comments | « no previous file | chrome/browser/shell_integration_linux.cc » ('j') | chrome/browser/shell_integration_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698