summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_util.cc
diff options
context:
space:
mode:
authorericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 19:53:30 +0000
committerericu@google.com <ericu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-13 19:53:30 +0000
commit41e889432dacf1044c38d23a49b7edbc44d273b6 (patch)
treea797a6dae1c5035f2a291bbae9276fb5dafeb6fe /webkit/fileapi/file_system_util.cc
parent2d90cbded0eff1772c1baec0ad4a7034542c15c1 (diff)
downloadchromium_src-41e889432dacf1044c38d23a49b7edbc44d273b6.zip
chromium_src-41e889432dacf1044c38d23a49b7edbc44d273b6.tar.gz
chromium_src-41e889432dacf1044c38d23a49b7edbc44d273b6.tar.bz2
More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where
possible without WebKit API changes. The WebKit changes will happen in another CL. This is a resubmit of http://codereview.chromium.org/6767010/, which bounced recently. There are a few changes here that weren't there [most notably in file_system_operation_write_unittest.cc and file_system_operation.cc], but they're pretty trivial build/test fixes. Review URL: http://codereview.chromium.org/6833007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81463 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_util.cc')
-rw-r--r--webkit/fileapi/file_system_util.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
index a15c2a8..75013da 100644
--- a/webkit/fileapi/file_system_util.cc
+++ b/webkit/fileapi/file_system_util.cc
@@ -88,17 +88,17 @@ bool CrackFileSystemURL(const GURL& url, GURL* origin_url, FileSystemType* type,
while (!path.empty() && path[0] == '/')
path.erase(0, 1);
-#if defined(OS_WIN)
- const FilePath::StringType sys_path = base::SysUTF8ToWide(path);
-#elif defined(OS_POSIX)
- const FilePath::StringType sys_path = path;
-#endif
if (origin_url)
*origin_url = origin;
if (type)
*type = file_system_type;
if (file_path)
- *file_path = FilePath(sys_path);
+#if defined(OS_WIN)
+ *file_path = FilePath(base::SysUTF8ToWide(path)).
+ NormalizeWindowsPathSeparators();
+#elif defined(OS_POSIX)
+ *file_path = FilePath(path);
+#endif
return true;
}