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

Unified Diff: content/renderer/drop_data_builder.cc

Issue 1686263008: Add utility method for WebString to base::FilePath conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase! Created 4 years, 10 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 | « content/child/webfileutilities_impl.cc ('k') | content/renderer/pepper/url_response_info_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/drop_data_builder.cc
diff --git a/content/renderer/drop_data_builder.cc b/content/renderer/drop_data_builder.cc
index 232428b5891004d3a4b611335b393707c17966a4..1016bcffe5be0952f51045db52860acc35a5af1a 100644
--- a/content/renderer/drop_data_builder.cc
+++ b/content/renderer/drop_data_builder.cc
@@ -8,6 +8,7 @@
#include "base/strings/string_util.h"
#include "content/public/common/drop_data.h"
+#include "third_party/WebKit/public/platform/FilePathConversion.h"
#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebDragData.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -60,8 +61,8 @@ DropData DropDataBuilder::Build(const WebDragData& drag_data) {
case WebDragData::Item::StorageTypeFilename:
// TODO(varunjain): This only works on chromeos. Support win/mac/gtk.
result.filenames.push_back(ui::FileInfo(
- base::FilePath::FromUTF16Unsafe(item.filenameData),
- base::FilePath::FromUTF16Unsafe(item.displayNameData)));
+ blink::WebStringToFilePath(item.filenameData),
+ blink::WebStringToFilePath(item.displayNameData)));
break;
case WebDragData::Item::StorageTypeFileSystemFile: {
DropData::FileSystemFileInfo info;
« no previous file with comments | « content/child/webfileutilities_impl.cc ('k') | content/renderer/pepper/url_response_info_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698