| Index: chrome/browser/bookmarks/bookmark_extension_api.cc
|
| diff --git a/chrome/browser/bookmarks/bookmark_extension_api.cc b/chrome/browser/bookmarks/bookmark_extension_api.cc
|
| index 25439774ce281f0c835ef0a3c3bf4231f4b8d326..410267ed9ba57fa0c73b566c654fd5216c12cf80 100644
|
| --- a/chrome/browser/bookmarks/bookmark_extension_api.cc
|
| +++ b/chrome/browser/bookmarks/bookmark_extension_api.cc
|
| @@ -31,6 +31,7 @@
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser_list.h"
|
| +#include "chrome/browser/ui/chrome_select_file_policy.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/pref_names.h"
|
| @@ -875,14 +876,16 @@ void BookmarksIOFunction::ShowSelectFileDialog(SelectFileDialog::Type type,
|
| // Balanced in one of the three callbacks of SelectFileDialog:
|
| // either FileSelectionCanceled, MultiFilesSelected, or FileSelected
|
| AddRef();
|
| - select_file_dialog_ = SelectFileDialog::Create(this);
|
| - SelectFileDialog::FileTypeInfo file_type_info;
|
| - file_type_info.extensions.resize(1);
|
| - file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("html"));
|
|
|
| WebContents* web_contents = dispatcher()->delegate()->
|
| GetAssociatedWebContents();
|
|
|
| + select_file_dialog_ = SelectFileDialog::Create(
|
| + this, new ChromeSelectFilePolicy(web_contents));
|
| + SelectFileDialog::FileTypeInfo file_type_info;
|
| + file_type_info.extensions.resize(1);
|
| + file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("html"));
|
| +
|
| // |tab_contents| can be NULL (for background pages), which is fine. In such
|
| // a case if file-selection dialogs are forbidden by policy, we will not
|
| // show an InfoBar, which is better than letting one appear out of the blue.
|
| @@ -892,7 +895,6 @@ void BookmarksIOFunction::ShowSelectFileDialog(SelectFileDialog::Type type,
|
| &file_type_info,
|
| 0,
|
| FILE_PATH_LITERAL(""),
|
| - web_contents,
|
| NULL,
|
| NULL);
|
| }
|
|
|