Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: chrome/browser/bookmarks/bookmark_extension_api.cc

Issue 10667026: Start consolidating cross-port file selection code into ui/base/dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix win Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_handler_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_handler_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698