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

Unified Diff: content/renderer/render_view_impl.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/renderer/pepper/url_response_info_util.cc ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 90c24f7ddffc019a20e0a8717bb3c7f6e0b11db2..ee8b839497eff44ee170dfa30382af1c80471f49 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -112,6 +112,7 @@
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/http/http_util.h"
#include "skia/ext/platform_canvas.h"
+#include "third_party/WebKit/public/platform/FilePathConversion.h"
#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebCString.h"
#include "third_party/WebKit/public/platform/WebConnectionType.h"
@@ -1739,7 +1740,7 @@ bool RenderViewImpl::enumerateChosenDirectory(
int id = enumeration_completion_id_++;
enumeration_completions_[id] = chooser_completion;
return Send(new ViewHostMsg_EnumerateDirectory(
- routing_id(), id, base::FilePath::FromUTF16Unsafe(path)));
+ routing_id(), id, blink::WebStringToFilePath(path)));
}
void RenderViewImpl::FrameDidStartLoading(WebFrame* frame) {
@@ -1819,7 +1820,7 @@ bool RenderViewImpl::runFileChooser(
ipc_params.mode = FileChooserParams::Open;
ipc_params.title = params.title;
ipc_params.default_file_name =
- base::FilePath::FromUTF16Unsafe(params.initialValue).BaseName();
+ blink::WebStringToFilePath(params.initialValue).BaseName();
ipc_params.accept_types.reserve(params.acceptTypes.size());
for (size_t i = 0; i < params.acceptTypes.size(); ++i)
ipc_params.accept_types.push_back(params.acceptTypes[i]);
« no previous file with comments | « content/renderer/pepper/url_response_info_util.cc ('k') | content/renderer/renderer_blink_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698