diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 6ef87068ba7db..76fe17aaaa4ad 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -27,6 +27,7 @@ #include "base/task/post_task.h" #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_version.h" #include "components/net_log/chrome_net_log.h" @@ -1017,12 +1018,10 @@ ElectronBrowserClient::GetPlatformNotificationService( } base::FilePath ElectronBrowserClient::GetDefaultDownloadDirectory() { - // ~/Downloads - base::FilePath path; - if (base::PathService::Get(base::DIR_HOME, &path)) - path = path.Append(FILE_PATH_LITERAL("Downloads")); - - return path; + base::FilePath download_path; + if (!chrome::GetUserDownloadsDirectory(&download_path)) + return base::FilePath(); + return download_path; } scoped_refptr