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

Unified Diff: webkit/fileapi/file_system_util.cc

Issue 7820005: Clean up old dead code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/common/file_system/webfilesystem_impl.cc ('k') | webkit/tools/test_shell/simple_file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_util.cc
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
index b084930067d9c01e5b85bfe0c4a9a68b02dd2de2..1314dfceffefd85aa36bb63830b7f99cc5bfe063 100644
--- a/webkit/fileapi/file_system_util.cc
+++ b/webkit/fileapi/file_system_util.cc
@@ -36,27 +36,11 @@ bool CrackFileSystemURL(const GURL& url, GURL* origin_url, FileSystemType* type,
return false;
std::string temp = url.path();
- // TODO(ericu) remove this code when that ceases to be true, which will be as
- // soon as the WEBFILESYSTEMCALLBACKS_USE_URL_NOT_STRING macro goes into
- // WebKit.
- // On Windows, this will have backslashes for now.
- // url will look something like:
- // filesystem:http://example.com/temporary/\dir\file.txt
- // temp will look something like:
- // http://example.com/temporary/\dir\file.txt
- // On posix, url will look something like:
- // filesystem:http://example.com/temporary/dir/file.txt
- // temp will look something like:
- // http://example.com/temporary/dir/file.txt
- size_t pos = temp.find('\\');
- for (; pos != std::string::npos; pos = temp.find('\\', pos + 1)) {
- temp[pos] = '/';
- }
// TODO(ericu): This should probably be done elsewhere after the stackable
// layers are properly in. We're supposed to reject any paths that contain
// '..' segments, but the GURL constructor is helpfully resolving them for us.
// Make sure there aren't any before we call it.
- pos = temp.find("..");
+ size_t pos = temp.find("..");
for (; pos != std::string::npos; pos = temp.find("..", pos + 1)) {
if ((pos == 0 || temp[pos - 1] == '/') &&
(pos == temp.length() - 2 || temp[pos + 2] == '/'))
« no previous file with comments | « content/common/file_system/webfilesystem_impl.cc ('k') | webkit/tools/test_shell/simple_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698