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

Unified Diff: content/child/web_url_request_util.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/simple_webmimeregistry_impl.cc ('k') | content/child/webblobregistry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_request_util.cc
diff --git a/content/child/web_url_request_util.cc b/content/child/web_url_request_util.cc
index f98343a537f807465afc4f82be6d334faa625442..c08a63772cf364afb32cff88ce1f566405c476ce 100644
--- a/content/child/web_url_request_util.cc
+++ b/content/child/web_url_request_util.cc
@@ -13,6 +13,7 @@
#include "base/strings/string_util.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
+#include "third_party/WebKit/public/platform/FilePathConversion.h"
#include "third_party/WebKit/public/platform/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
@@ -256,11 +257,11 @@ scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest(
case WebHTTPBody::Element::TypeFile:
if (element.fileLength == -1) {
request_body->AppendFileRange(
- base::FilePath::FromUTF16Unsafe(element.filePath), 0,
+ blink::WebStringToFilePath(element.filePath), 0,
std::numeric_limits<uint64_t>::max(), base::Time());
} else {
request_body->AppendFileRange(
- base::FilePath::FromUTF16Unsafe(element.filePath),
+ blink::WebStringToFilePath(element.filePath),
static_cast<uint64_t>(element.fileStart),
static_cast<uint64_t>(element.fileLength),
base::Time::FromDoubleT(element.modificationTime));
« no previous file with comments | « content/child/simple_webmimeregistry_impl.cc ('k') | content/child/webblobregistry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698