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

Unified Diff: webkit/chromeos/fileapi/cros_mount_point_provider.h

Issue 6864040: Fixed file/directory url resolution for external mount point provider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/chromeos/fileapi/cros_mount_point_provider.h
===================================================================
--- webkit/chromeos/fileapi/cros_mount_point_provider.h (revision 81876)
+++ webkit/chromeos/fileapi/cros_mount_point_provider.h (working copy)
@@ -10,6 +10,7 @@
#include <vector>
#include "base/file_path.h"
+#include "base/synchronization/lock.h"
#include "webkit/fileapi/file_system_mount_point_provider.h"
#include "webkit/quota/special_storage_policy.h"
@@ -33,6 +34,8 @@
const GURL& origin_url,
fileapi::FileSystemType type,
bool create,
+ bool is_file_system,
+ const FilePath& virtual_path,
fileapi::FileSystemPathManager::GetRootPathCallback* callback) OVERRIDE;
virtual FilePath GetFileSystemRootPathOnFileThread(
const GURL& origin_url,
@@ -47,12 +50,20 @@
const std::string& extension_id) OVERRIDE;
virtual void GrantFileAccessToExtension(
const std::string& extension_id, const FilePath& virtual_path) OVERRIDE;
- void RevokeAccessForExtension(const std::string& extension_id) OVERRIDE;
+ virtual void RevokeAccessForExtension(
+ const std::string& extension_id) OVERRIDE;
+ virtual void AddMountPoint(FilePath mount_point) OVERRIDE;
+ virtual void RemoveMountPoint(FilePath mount_point) OVERRIDE;
private:
class GetFileSystemRootPathTask;
typedef std::map<std::string, FilePath> MountPointMap;
+ // Gives the real file system's |root_path| for given |virtual_path|. Returns
+ // false when |virtual_path| cannot be mapped to the real file system.
+ bool GetRootForVirtualPath(const FilePath& virtual_path, FilePath* root_path);
+
+ base::Lock lock_; // Synchronize all access to path_map_.
MountPointMap mount_point_map_;
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
scoped_ptr<FileAccessPermissions> file_access_permissions_;

Powered by Google App Engine
This is Rietveld 408576698