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

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: . 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..793568d0d81cd2c95b46e2c79ad82f8824d84dfd 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));
+ FileSystemURL url(origin,
+ kFileSystemTypeExternal,
+ FilePath::FromUTF8Unsafe(service_name).Append(path));
+ return ExternalMountPoints::GetSystemInstance()->CrackURL(url);
}
bool SerializeSyncableFileSystemURL(const FileSystemURL& url,
@@ -55,12 +56,10 @@ 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)
+ *url = ExternalMountPoints::GetSystemInstance()->CrackURL(
+ FileSystemURL(GURL(serialized_url)));
+ if (!url->is_valid() || url->type() != kFileSystemTypeSyncable)
return false;
-
- *url = deserialized_url;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698