| Index: chrome/browser/chromeos/extensions/file_browser_handler_api.cc
|
| diff --git a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
|
| index 0bd0ee58452bebaf34f0999a1b84ddc0f7004d45..bafb68557ca9c959d35bf6f3a2cadff22da1df9d 100644
|
| --- a/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
|
| +++ b/chrome/browser/chromeos/extensions/file_browser_handler_api.cc
|
| @@ -179,6 +179,35 @@ void RelayOpenFileSystemCallbackToFileThread(
|
|
|
| FileHandlerSelectFileFunction::FileHandlerSelectFileFunction() {}
|
|
|
| +void FileHandlerSelectFileFunction::OnFilePathSelected(
|
| + bool success,
|
| + const FilePath& full_path) {
|
| + if (!success) {
|
| + Respond(false, std::string(), GURL(), FilePath());
|
| + return;
|
| + }
|
| +
|
| + full_path_ = full_path;
|
| +
|
| + BrowserContext::GetFileSystemContext(profile_)->OpenFileSystem(
|
| + source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
|
| + base::Bind(&RelayOpenFileSystemCallbackToFileThread,
|
| + base::Bind(&FileHandlerSelectFileFunction::CreateFileOnFileThread,
|
| + this)));
|
| +};
|
| +
|
| +// static
|
| +void FileHandlerSelectFileFunction::set_file_selector_for_test(
|
| + FileSelector* file_selector) {
|
| + FileHandlerSelectFileFunction::file_selector_for_test_ = file_selector;
|
| +}
|
| +
|
| +// static
|
| +void FileHandlerSelectFileFunction::set_gesture_check_disabled_for_test(
|
| + bool disabled) {
|
| + FileHandlerSelectFileFunction::gesture_check_disabled_for_test_ = disabled;
|
| +}
|
| +
|
| FileHandlerSelectFileFunction::~FileHandlerSelectFileFunction() {}
|
|
|
| bool FileHandlerSelectFileFunction::RunImpl() {
|
| @@ -198,35 +227,6 @@ bool FileHandlerSelectFileFunction::RunImpl() {
|
| return true;
|
| }
|
|
|
| -// static
|
| -void FileHandlerSelectFileFunction::set_file_selector_for_test(
|
| - FileSelector* file_selector) {
|
| - FileHandlerSelectFileFunction::file_selector_for_test_ = file_selector;
|
| -}
|
| -
|
| -// static
|
| -void FileHandlerSelectFileFunction::set_gesture_check_disabled_for_test(
|
| - bool disabled) {
|
| - FileHandlerSelectFileFunction::gesture_check_disabled_for_test_ = disabled;
|
| -}
|
| -
|
| -void FileHandlerSelectFileFunction::OnFilePathSelected(
|
| - bool success,
|
| - const FilePath& full_path) {
|
| - if (!success) {
|
| - Respond(false, std::string(), GURL(), FilePath());
|
| - return;
|
| - }
|
| -
|
| - full_path_ = full_path;
|
| -
|
| - BrowserContext::GetFileSystemContext(profile_)->OpenFileSystem(
|
| - source_url_.GetOrigin(), fileapi::kFileSystemTypeExternal, false,
|
| - base::Bind(&RelayOpenFileSystemCallbackToFileThread,
|
| - base::Bind(&FileHandlerSelectFileFunction::CreateFileOnFileThread,
|
| - this)));
|
| -};
|
| -
|
| void FileHandlerSelectFileFunction::CreateFileOnFileThread(
|
| bool success,
|
| const std::string& file_system_name,
|
|
|