From 1a744ca48513fe8aaa8edb31adfa534effb89683 Mon Sep 17 00:00:00 2001 From: Adam Kallai Date: Thu, 5 Feb 2015 15:23:23 +0100 Subject: Fix the fileListingHelper template function specialisation The WebContentsAdapter::filesSelectedInChooser function parameter type has been changed since the Chromium update. Thus content::FileChooserFileInfo has to be used instead of ui::SelectedFileInfo. Change-Id: Ia6a50409f3f7c704228cb739fc50d694e633dbee Reviewed-by: Andras Becsi --- src/core/type_conversion.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h index 781023b7c..6bb755abc 100644 --- a/src/core/type_conversion.h +++ b/src/core/type_conversion.h @@ -46,10 +46,10 @@ #include #include "base/files/file_path.h" #include "base/time/time.h" +#include "content/public/common/file_chooser_file_info.h" #include "third_party/skia/include/utils/SkMatrix44.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/rect.h" -#include "ui/shell_dialogs/selected_file_info.h" #include "url/gurl.h" inline QString toQt(const base::string16 &string) @@ -158,10 +158,13 @@ template inline T fileListingHelper(const QString &) {qFatal("Specialization missing for %s.", Q_FUNC_INFO); return T(); } template <> -inline ui::SelectedFileInfo fileListingHelper(const QString &file) +inline content::FileChooserFileInfo fileListingHelper(const QString &file) { - base::FilePath fp(toFilePathString(file)); - return ui::SelectedFileInfo(fp, fp); + content::FileChooserFileInfo choose_file; + base::FilePath fp(toFilePath(file)); + choose_file.file_path = fp; + choose_file.display_name = fp.BaseName().value(); + return choose_file; } template <> -- cgit v1.2.3