Index: chrome/browser/file_select_helper.cc |
diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc |
index 9c11232eaa575021cab34cab52b7eb31ba6ece12..67c886dab79bef3ca29b31b4a70b14af50047fc4 100644 |
--- a/chrome/browser/file_select_helper.cc |
+++ b/chrome/browser/file_select_helper.cc |
@@ -16,6 +16,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_list.h" |
+#include "chrome/browser/ui/chrome_select_file_policy.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_source.h" |
#include "content/public/browser/notification_types.h" |
@@ -371,8 +372,8 @@ void FileSelectHelper::RunFileChooserOnUIThread( |
return; |
} |
- if (!select_file_dialog_.get()) |
- select_file_dialog_ = SelectFileDialog::Create(this); |
+ select_file_dialog_ = SelectFileDialog::Create( |
+ this, new ChromeSelectFilePolicy(web_contents_)); |
switch (params.mode) { |
case FileChooserParams::Open: |
@@ -405,7 +406,6 @@ void FileSelectHelper::RunFileChooserOnUIThread( |
select_file_types_.get(), |
select_file_types_.get() ? 1 : 0, // 1-based index. |
FILE_PATH_LITERAL(""), |
- web_contents_, |
owning_window, |
#if defined(OS_ANDROID) |
const_cast<content::FileChooserParams*>(¶ms)); |