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

Side by Side Diff: webkit/fileapi/file_system_path_manager.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ 5 #ifndef WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_
6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ 6 #define WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // If the request is accepted, |create| is specified for 48 // If the request is accepted, |create| is specified for
49 // GetFileSystemRootPath, and the root directory does not exist, it creates 49 // GetFileSystemRootPath, and the root directory does not exist, it creates
50 // a new one and calls back with success=true if the creation has succeeded. 50 // a new one and calls back with success=true if the creation has succeeded.
51 typedef Callback3<bool /* success */, 51 typedef Callback3<bool /* success */,
52 const FilePath& /* root_path */, 52 const FilePath& /* root_path */,
53 const std::string& /* name */>::Type GetRootPathCallback; 53 const std::string& /* name */>::Type GetRootPathCallback;
54 54
55 // Retrieves the root path for the given |origin_url| and |type|, and 55 // Retrieves the root path for the given |origin_url| and |type|, and
56 // calls the given |callback| with the root path and name. 56 // calls the given |callback| with the root path and name.
57 // If |create| is true this also creates the directory if it doesn't exist. 57 // If |create| is true this also creates the directory if it doesn't exist.
58 virtual void GetFileSystemRootPath(const GURL& origin_url, 58 virtual void ValidateFileSystemRootAndGetURL(
59 FileSystemType type, 59 const GURL& origin_url,
60 bool create, 60 FileSystemType type,
61 FileSystemPathManager::GetRootPathCallback* 61 bool create,
62 callback); 62 FileSystemPathManager::GetRootPathCallback* callback);
63 63
64 // Like GetFileSystemRootPath, but synchronous, and can be called only while 64 // Like GetFileSystemRootPath, but synchronous, and can be called only while
65 // running on the file thread. 65 // running on the file thread.
66 virtual FilePath GetFileSystemRootPathOnFileThread( 66 virtual FilePath ValidateFileSystemRootAndGetPathOnFileThread(
67 const GURL& origin_url, 67 const GURL& origin_url,
68 FileSystemType type, 68 FileSystemType type,
69 const FilePath& virtual_path, 69 const FilePath& virtual_path,
70 bool create); 70 bool create);
71 71
72 // Returns true if the given |url|'s scheme is allowed to access 72 // Returns true if the given |url|'s scheme is allowed to access
73 // filesystem. 73 // filesystem.
74 bool IsAllowedScheme(const GURL& url) const; 74 bool IsAllowedScheme(const GURL& url) const;
75 75
76 // Returns the string for the given |type|. 76 // Returns the string for the given |type|.
(...skipping 26 matching lines...) Expand all
103 const bool allow_file_access_from_files_; 103 const bool allow_file_access_from_files_;
104 scoped_ptr<SandboxMountPointProvider> sandbox_provider_; 104 scoped_ptr<SandboxMountPointProvider> sandbox_provider_;
105 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_; 105 scoped_ptr<ExternalFileSystemMountPointProvider> external_provider_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); 107 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager);
108 }; 108 };
109 109
110 } // namespace fileapi 110 } // namespace fileapi
111 111
112 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ 112 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698