OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace fileapi { | 21 namespace fileapi { |
22 | 22 |
23 class FileSystemPathManager { | 23 class FileSystemPathManager { |
24 public: | 24 public: |
25 FileSystemPathManager(scoped_refptr<base::MessageLoopProxy> file_message_loop, | 25 FileSystemPathManager(scoped_refptr<base::MessageLoopProxy> file_message_loop, |
26 const FilePath& profile_path, | 26 const FilePath& profile_path, |
27 bool is_incognito, | 27 bool is_incognito, |
28 bool allow_file_access_from_files); | 28 bool allow_file_access_from_files); |
29 ~FileSystemPathManager(); | 29 ~FileSystemPathManager(); |
30 | 30 |
31 static FilePath GetFileSystemCommonRootDirectory(const FilePath& root_path); | |
32 | |
33 // Callback for GetFileSystemRootPath. | 31 // Callback for GetFileSystemRootPath. |
34 // If the request is accepted and the root filesystem for the origin exists | 32 // If the request is accepted and the root filesystem for the origin exists |
35 // the callback is called with success=true and valid root_path and name. | 33 // the callback is called with success=true and valid root_path and name. |
36 // If the request is accepted, |create| is specified for | 34 // If the request is accepted, |create| is specified for |
37 // GetFileSystemRootPath, and the root directory does not exist, it creates | 35 // GetFileSystemRootPath, and the root directory does not exist, it creates |
38 // a new one and calls back with success=true if the creation has succeeded. | 36 // a new one and calls back with success=true if the creation has succeeded. |
39 typedef Callback3<bool /* success */, | 37 typedef Callback3<bool /* success */, |
40 const FilePath& /* root_path */, | 38 const FilePath& /* root_path */, |
41 const std::string& /* name */>::Type GetRootPathCallback; | 39 const std::string& /* name */>::Type GetRootPathCallback; |
42 | 40 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const FilePath base_path_; | 85 const FilePath base_path_; |
88 const bool is_incognito_; | 86 const bool is_incognito_; |
89 const bool allow_file_access_from_files_; | 87 const bool allow_file_access_from_files_; |
90 | 88 |
91 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); | 89 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); |
92 }; | 90 }; |
93 | 91 |
94 } // namespace fileapi | 92 } // namespace fileapi |
95 | 93 |
96 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ | 94 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
OLD | NEW |