Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 typedef base::Callback<void(const GURL& root_url, | 46 typedef base::Callback<void(const GURL& root_url, |
| 47 const std::string& name, | 47 const std::string& name, |
| 48 base::PlatformFileError error)> | 48 base::PlatformFileError error)> |
| 49 InitializeFileSystemCallback; | 49 InitializeFileSystemCallback; |
| 50 virtual ~FileSystemBackend() {} | 50 virtual ~FileSystemBackend() {} |
| 51 | 51 |
| 52 // Returns true if this mount point provider can handle |type|. | 52 // Returns true if this mount point provider can handle |type|. |
| 53 // One mount point provider may be able to handle multiple filesystem types. | 53 // One mount point provider may be able to handle multiple filesystem types. |
| 54 virtual bool CanHandleType(FileSystemType type) const = 0; | 54 virtual bool CanHandleType(FileSystemType type) const = 0; |
| 55 | 55 |
| 56 // Initializes the filesystem. | |
|
kinuko
2013/07/23 07:33:49
Can you elaborate more? E.g.
This method if call
nhiroki
2013/07/23 08:11:23
Done.
| |
| 57 virtual void Initialize(const FileSystemContext* context) = 0; | |
| 58 | |
| 56 // Initializes the filesystem for the given |origin_url| and |type|. | 59 // Initializes the filesystem for the given |origin_url| and |type|. |
| 57 // This verifies if it is allowed to request (or create) the filesystem | 60 // This verifies if it is allowed to request (or create) the filesystem |
| 58 // and if it can access (or create) the root directory of the mount point. | 61 // and if it can access (or create) the root directory of the mount point. |
| 59 // If |mode| is CREATE_IF_NONEXISTENT calling this may also create | 62 // If |mode| is CREATE_IF_NONEXISTENT calling this may also create |
| 60 // the root directory (and/or related database entries etc) for | 63 // the root directory (and/or related database entries etc) for |
| 61 // the filesystem if it doesn't exist. | 64 // the filesystem if it doesn't exist. |
| 62 virtual void InitializeFileSystem( | 65 virtual void InitializeFileSystem( |
| 63 const GURL& origin_url, | 66 const GURL& origin_url, |
| 64 FileSystemType type, | 67 FileSystemType type, |
| 65 OpenFileSystemMode mode, | 68 OpenFileSystemMode mode, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 const std::string& extension_id) = 0; | 146 const std::string& extension_id) = 0; |
| 144 // Gets virtual path by known filesystem path. Returns false when filesystem | 147 // Gets virtual path by known filesystem path. Returns false when filesystem |
| 145 // path is not exposed by this provider. | 148 // path is not exposed by this provider. |
| 146 virtual bool GetVirtualPath(const base::FilePath& file_system_path, | 149 virtual bool GetVirtualPath(const base::FilePath& file_system_path, |
| 147 base::FilePath* virtual_path) = 0; | 150 base::FilePath* virtual_path) = 0; |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 } // namespace fileapi | 153 } // namespace fileapi |
| 151 | 154 |
| 152 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ | 155 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ |
| OLD | NEW |