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

Unified Diff: webkit/fileapi/syncable/syncable_file_system_util.cc

Issue 11787028: New FileSystemURL cracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test on Win Created 7 years, 11 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
Index: webkit/fileapi/syncable/syncable_file_system_util.cc
diff --git a/webkit/fileapi/syncable/syncable_file_system_util.cc b/webkit/fileapi/syncable/syncable_file_system_util.cc
index 21652d081c18a74543e075aa424974db075420ab..e8d87d9f869d27b93436d20d0dc013da3001ae88 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_util.cc
@@ -34,9 +34,10 @@ GURL GetSyncableFileSystemRootURI(const GURL& origin,
FileSystemURL CreateSyncableFileSystemURL(const GURL& origin,
const std::string& service_name,
const FilePath& path) {
- return FileSystemURL(origin,
- kFileSystemTypeExternal,
- FilePath::FromUTF8Unsafe(service_name).Append(path));
+ return ExternalMountPoints::GetSystemInstance()->CreateCrackedFileSystemURL(
+ origin,
+ kFileSystemTypeExternal,
+ FilePath::FromUTF8Unsafe(service_name).Append(path));
}
bool SerializeSyncableFileSystemURL(const FileSystemURL& url,
@@ -55,12 +56,14 @@ bool DeserializeSyncableFileSystemURL(
DCHECK(serialized_url.find('\\') == std::string::npos);
#endif // FILE_PATH_USES_WIN_SEPARATORS
- const FileSystemURL deserialized_url = FileSystemURL(GURL(serialized_url));
- if (!deserialized_url.is_valid() ||
- deserialized_url.type() != kFileSystemTypeSyncable)
+ FileSystemURL deserialized =
+ ExternalMountPoints::GetSystemInstance()->CrackURL(GURL(serialized_url));
+ if (!deserialized.is_valid() ||
+ deserialized.type() != kFileSystemTypeSyncable) {
return false;
+ }
- *url = deserialized_url;
+ *url = deserialized;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698