| Index: chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.cc
|
| diff --git a/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.cc
|
| index a70d784e50afa57986f4400b406f69a0079a2deb..a7f7c786720d63b25226973f58d5c1f707ad6f5f 100644
|
| --- a/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.cc
|
| +++ b/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.cc
|
| @@ -17,6 +17,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/browser_finder.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| +#include "chrome/browser/ui/chrome_select_file_policy.h"
|
| #include "chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source2.h"
|
| #include "chrome/browser/ui/webui/web_ui_util.h"
|
| #include "chrome/common/chrome_paths.h"
|
| @@ -176,8 +177,8 @@ void SetWallpaperOptionsHandler::HandlePageShown(const base::ListValue* args) {
|
|
|
| void SetWallpaperOptionsHandler::HandleChooseFile(const ListValue* args) {
|
| DCHECK(args && args->empty());
|
| - if (!select_file_dialog_.get())
|
| - select_file_dialog_ = SelectFileDialog::Create(this);
|
| + select_file_dialog_ = SelectFileDialog::Create(
|
| + this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
|
|
|
| FilePath downloads_path;
|
| if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_path))
|
| @@ -191,7 +192,6 @@ void SetWallpaperOptionsHandler::HandleChooseFile(const ListValue* args) {
|
| l10n_util::GetStringUTF16(IDS_DOWNLOAD_TITLE),
|
| downloads_path, &file_type_info, 0,
|
| FILE_PATH_LITERAL(""),
|
| - web_ui()->GetWebContents(),
|
| GetBrowserWindow(), NULL);
|
| }
|
|
|
|
|