Skip to content

Commit

Permalink
Deprecate ScopedExternalFileSystem
Browse files Browse the repository at this point in the history
Before migrating from webkit/ to content/ we'll need to make one public
interface per one file, which means ScopedExternalFileSystem needs to be
separated out from external_mount_points.h -- but it turned out that
it's currently used only by one file, so I'm rather deprecating it.

BUG=265769
TEST=none

Review URL: https://codereview.chromium.org/26455002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227514 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
kinuko@chromium.org committed Oct 8, 2013
1 parent e34792a commit 3859f63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ bool CreateV0SerializedSyncableFileSystemURL(
const GURL& origin,
const base::FilePath& path,
std::string* serialized_url) {
fileapi::ScopedExternalFileSystem scoped_fs(
fileapi::ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
kV0ServiceName, fileapi::kFileSystemTypeSyncable, base::FilePath());

fileapi::FileSystemURL url =
fileapi::ExternalMountPoints::GetSystemInstance()->
CreateExternalFileSystemURL(origin, kV0ServiceName, path);
fileapi::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
kV0ServiceName);

if (!url.is_valid())
return false;
*serialized_url = fileapi::GetExternalFileSystemRootURIString(
Expand Down
18 changes: 0 additions & 18 deletions webkit/browser/fileapi/external_mount_points.cc
Original file line number Diff line number Diff line change
Expand Up @@ -314,22 +314,4 @@ bool ExternalMountPoints::ValidateNewMountPoint(const std::string& mount_name,
!path.IsParent(potential_child->first);
}

ScopedExternalFileSystem::ScopedExternalFileSystem(
const std::string& mount_name,
FileSystemType type,
const base::FilePath& path)
: mount_name_(mount_name) {
ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
mount_name, type, path);
}

base::FilePath ScopedExternalFileSystem::GetVirtualRootPath() const {
return ExternalMountPoints::GetSystemInstance()->
CreateVirtualRootPath(mount_name_);
}

ScopedExternalFileSystem::~ScopedExternalFileSystem() {
ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(mount_name_);
}

} // namespace fileapi
14 changes: 0 additions & 14 deletions webkit/browser/fileapi/external_mount_points.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,6 @@ class WEBKIT_STORAGE_BROWSER_EXPORT ExternalMountPoints
DISALLOW_COPY_AND_ASSIGN(ExternalMountPoints);
};

// Registers a scoped external filesystem which gets revoked when it scopes out.
class WEBKIT_STORAGE_BROWSER_EXPORT ScopedExternalFileSystem {
public:
ScopedExternalFileSystem(const std::string& mount_name,
FileSystemType type,
const base::FilePath& path);
~ScopedExternalFileSystem();

base::FilePath GetVirtualRootPath() const;

private:
const std::string mount_name_;
};

} // namespace fileapi

#endif // WEBKIT_BROWSER_FILEAPI_EXTERNAL_MOUNT_POINTS_H_

0 comments on commit 3859f63

Please sign in to comment.