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

Unified Diff: chrome/browser/extensions/api/file_system/file_system_api.cc

Issue 13042004: Fix crash of chrome.fileSystem.chooseEntry on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/file_system/file_system_api.cc
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index 09bf70d264a988221abf55bdb70aea7c90a92793..89dbb97da3dc58ea9af66f82033b5ed69d6e2936 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -417,13 +417,10 @@ class FileSystemChooseEntryFunction::FilePicker
if (g_skip_picker_for_test) {
if (g_path_to_be_picked_for_test) {
- ui::SelectedFileInfo selected_path(*g_path_to_be_picked_for_test,
- base::FilePath());
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
base::Bind(
- &FileSystemChooseEntryFunction::FilePicker::
- FileSelectedWithExtraInfo,
- base::Unretained(this), selected_path, 1,
+ &FileSystemChooseEntryFunction::FilePicker::FileSelected,
+ base::Unretained(this), *g_path_to_be_picked_for_test, 1,
static_cast<void*>(NULL)));
} else {
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
@@ -449,8 +446,8 @@ class FileSystemChooseEntryFunction::FilePicker
virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE {
- // The version taking ui::SelectedFileInfo should be used.
- NOTREACHED();
+ function_->FileSelected(path, entry_type_);
+ delete this;
}
virtual void FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698