summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorericu@chromium.org <ericu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 21:25:36 +0000
committerericu@chromium.org <ericu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 21:25:36 +0000
commitfb14c77653c8de79100d843738be3f5c9fc6c387 (patch)
treeaff594479933ec5d5fcf36a814d1b49cab62e543 /webkit
parent9bdcfd64a8555352b63437db70ff06eabd259a16 (diff)
downloadchromium_src-fb14c77653c8de79100d843738be3f5c9fc6c387.zip
chromium_src-fb14c77653c8de79100d843738be3f5c9fc6c387.tar.gz
chromium_src-fb14c77653c8de79100d843738be3f5c9fc6c387.tar.bz2
Escape filesystem paths properly in Pepper filesystem URLs.
BUG=156587 TEST=ppapi file_io test [see bug] Review URL: https://chromiumcodereview.appspot.com/11275066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/plugins/ppapi/ppb_file_ref_impl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.cc b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
index a3864f8..b74a4c4 100644
--- a/webkit/plugins/ppapi/ppb_file_ref_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
@@ -7,6 +7,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
+#include "net/base/escape.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_file_system_api.h"
@@ -270,9 +271,9 @@ GURL PPB_FileRef_Impl::GetFileSystemURL() const {
// Since |virtual_path_| starts with a '/', it looks like an absolute path.
// We need to trim off the '/' before calling Resolve, as FileSystem URLs
// start with a storage type identifier that looks like a path segment.
- // TODO(ericu): Switch this to use Resolve after fixing GURL to understand
- // FileSystem URLs.
- return GURL(file_system_->root_url().spec() + virtual_path.substr(1));
+
+ return file_system_->root_url().Resolve(
+ net::EscapePath(virtual_path.substr(1)));
}
bool PPB_FileRef_Impl::HasValidFileSystem() const {