|
@@ -235,12 +235,8 @@ void WebDialogHelper::RunFileChooser(
|
|
|
NOTREACHED();
|
|
|
}
|
|
|
|
|
|
- AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(
|
|
|
- window_->web_contents()->GetBrowserContext());
|
|
|
- if (!browser_context) {
|
|
|
- browser_context = static_cast<atom::AtomBrowserContext*>(
|
|
|
- render_frame_host->GetProcess()->GetBrowserContext());
|
|
|
- }
|
|
|
+ auto* browser_context = static_cast<atom::AtomBrowserContext*>(
|
|
|
+ render_frame_host->GetProcess()->GetBrowserContext());
|
|
|
settings.default_path = browser_context->prefs()->GetFilePath(
|
|
|
prefs::kSelectFileLastDirectory).Append(params.default_file_name);
|
|
|
settings.properties = flags;
|