Cleanup FileSystemOperation for preparing for adding FSO-factory method

1. Move OpenFileSystem() to FileSystemContext
2. Change Cancel() not to take another FileSystemOperation
 These two changes are made so that all the operations that require FileSystemOperation take target path URL.

3. Did some related code cleanups in FileSystemMountPointProvider:
 - Renamed ValidateFileSystemRootAndGetURL() to ValidateFileSystemRoot() as we no longer need to return RootURL
 - Renamed ValidateFileSystemRootAndGetPathOnFileThread() to GetFileSystemRootPathOnFileThread() for the sake of simplicity
 - Reimplemented SandboxMPP::GetRootPathTask using PostTaskAndReply

Patch from http://codereview.chromium.org/9004019/

BUG=none
TEST=existing tests should pass

Review URL: http://codereview.chromium.org/9016020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117197 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/webkit/fileapi/sandbox_mount_point_provider.h b/webkit/fileapi/sandbox_mount_point_provider.h
index e7db7b9..2ee584e 100644
--- a/webkit/fileapi/sandbox_mount_point_provider.h
+++ b/webkit/fileapi/sandbox_mount_point_provider.h
@@ -37,7 +37,8 @@
     : public FileSystemMountPointProvider,
       public FileSystemQuotaUtil {
  public:
-  typedef FileSystemMountPointProvider::GetRootPathCallback GetRootPathCallback;
+  typedef FileSystemMountPointProvider::ValidateFileSystemCallback
+      ValidateFileSystemCallback;
 
   // Origin enumerator interface.
   // An instance of this interface is assumed to be called on the file thread.
@@ -67,20 +68,20 @@
   virtual ~SandboxMountPointProvider();
 
   // FileSystemMountPointProvider overrides.
+  virtual void ValidateFileSystemRoot(
+      const GURL& origin_url,
+      FileSystemType type,
+      bool create,
+      const ValidateFileSystemCallback& callback) OVERRIDE;
+  virtual FilePath GetFileSystemRootPathOnFileThread(
+      const GURL& origin_url,
+      FileSystemType type,
+      const FilePath& virtual_path,
+      bool create) OVERRIDE;
   virtual bool IsAccessAllowed(
       const GURL& origin_url,
       FileSystemType type,
       const FilePath& virtual_path) OVERRIDE;
-  virtual void ValidateFileSystemRootAndGetURL(
-      const GURL& origin_url,
-      FileSystemType type,
-      bool create,
-      const GetRootPathCallback& callback) OVERRIDE;
-  virtual FilePath ValidateFileSystemRootAndGetPathOnFileThread(
-      const GURL& origin_url,
-      FileSystemType type,
-      const FilePath& unused,
-      bool create) OVERRIDE;
   virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE;
   virtual std::vector<FilePath> GetRootDirectories() const OVERRIDE;
   virtual FileSystemFileUtil* GetFileUtil() OVERRIDE;
@@ -155,8 +156,6 @@
   // filesystem.
   bool IsAllowedScheme(const GURL& url) const;
 
-  class GetFileSystemRootPathTask;
-
   friend class FileSystemTestOriginHelper;
   friend class SandboxMountPointProviderMigrationTest;
   friend class SandboxMountPointProviderOriginEnumeratorTest;