| Index: chrome/browser/file_select_helper.cc
|
| diff --git a/chrome/browser/file_select_helper.cc b/chrome/browser/file_select_helper.cc
|
| index 7438a5063b83e835bc24273c2a59edca060fbd38..b6ab78b558c942ca72d3b3c26067757750c1ef44 100644
|
| --- a/chrome/browser/file_select_helper.cc
|
| +++ b/chrome/browser/file_select_helper.cc
|
| @@ -407,6 +407,14 @@ void FileSelectHelper::RunFileChooserOnUIThread(
|
| gfx::NativeWindow owning_window =
|
| platform_util::GetTopLevel(render_view_host_->GetView()->GetNativeView());
|
|
|
| +#if defined(OS_ANDROID)
|
| + // Android needs the original MIME types and an additional capture value.
|
| + std::vector<string16> accept_types(params.accept_types);
|
| + // We append the capture value to the end of the accept_types vector. This
|
| + // allows to pass MIME types and the capture value to the SelectFile method.
|
| + accept_types.push_back(params.capture);
|
| +#endif
|
| +
|
| select_file_dialog_->SelectFile(
|
| dialog_type_,
|
| params.title,
|
| @@ -416,7 +424,7 @@ void FileSelectHelper::RunFileChooserOnUIThread(
|
| FILE_PATH_LITERAL(""),
|
| owning_window,
|
| #if defined(OS_ANDROID)
|
| - const_cast<content::FileChooserParams*>(¶ms));
|
| + &accept_types);
|
| #else
|
| NULL);
|
| #endif
|
|
|