chore: use auto to avoid repeating type (#26113)

This commit is contained in:
David Sanders 2020-10-26 11:56:31 -07:00 committed by GitHub
parent f714556a12
commit 4be10523e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 38 additions and 48 deletions

View file

@ -153,9 +153,8 @@ void ElectronDownloadManagerDelegate::OnDownloadSaveDialogDone(
if (!canceled) {
if (result.Get("filePath", &path)) {
// Remember the last selected download directory.
ElectronBrowserContext* browser_context =
static_cast<ElectronBrowserContext*>(
download_manager_->GetBrowserContext());
auto* browser_context = static_cast<ElectronBrowserContext*>(
download_manager_->GetBrowserContext());
browser_context->prefs()->SetFilePath(prefs::kDownloadDefaultDirectory,
path.DirName());
@ -211,9 +210,8 @@ bool ElectronDownloadManagerDelegate::DetermineDownloadTarget(
return true;
}
ElectronBrowserContext* browser_context =
static_cast<ElectronBrowserContext*>(
download_manager_->GetBrowserContext());
auto* browser_context = static_cast<ElectronBrowserContext*>(
download_manager_->GetBrowserContext());
base::FilePath default_download_path =
browser_context->prefs()->GetFilePath(prefs::kDownloadDefaultDirectory);