chore: use auto to avoid repeating type (#26113)
This commit is contained in:
parent
f714556a12
commit
4be10523e8
25 changed files with 38 additions and 48 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue