| Index: webkit/fileapi/external_mount_points.cc
|
| diff --git a/webkit/fileapi/external_mount_points.cc b/webkit/fileapi/external_mount_points.cc
|
| index 9abba4218cfe17fb4bcf2609a2ea7e4ca6690cba..db15dc863693e801027ab51e37404c4785e93d12 100644
|
| --- a/webkit/fileapi/external_mount_points.cc
|
| +++ b/webkit/fileapi/external_mount_points.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/lazy_instance.h"
|
| #include "base/path_service.h"
|
| #include "base/stl_util.h"
|
| +#include "webkit/fileapi/file_system_url.h"
|
| #include "webkit/fileapi/remote_file_system_proxy.h"
|
|
|
| namespace {
|
| @@ -240,6 +241,38 @@ void ExternalMountPoints::AddMountPointInfosTo(
|
| }
|
| }
|
|
|
| +
|
| +bool ExternalMountPoints::CanHandleURL(const FileSystemURL& url) const {
|
| + return url.is_valid() && url.type() == kFileSystemTypeExternal;
|
| +}
|
| +
|
| +FileSystemURL ExternalMountPoints::CrackFileSystemURL(
|
| + const FileSystemURL& url) const {
|
| + if (!CanHandleURL(url))
|
| + return FileSystemURL();
|
| +
|
| + DCHECK(!url.is_cracked());
|
| +
|
| + std::string mount_name;
|
| + FileSystemType type;
|
| + FilePath path;
|
| + if (!CrackVirtualPath(url.path(), &mount_name, &type, &path))
|
| + return FileSystemURL();
|
| +
|
| + return FileSystemURL::CreateForCrackedURL(url, mount_name, type, path);
|
| +}
|
| +
|
| +FileSystemURL ExternalMountPoints::CrackURL(const GURL& url) const {
|
| + return CrackFileSystemURL(FileSystemURL(url));
|
| +}
|
| +
|
| +FileSystemURL ExternalMountPoints::CreateCrackedFileSystemURL(
|
| + const GURL& origin,
|
| + FileSystemType type,
|
| + const FilePath& path) const {
|
| + return CrackFileSystemURL(FileSystemURL(origin, type, path));
|
| +}
|
| +
|
| bool ExternalMountPoints::GetVirtualPath(const FilePath& path_in,
|
| FilePath* virtual_path) {
|
| DCHECK(virtual_path);
|
|
|