Chromium Code Reviews| 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_; |
| } |