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" |
11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
12 #include "base/message_loop_proxy.h" | |
13 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
14 #include "googleurl/src/gurl.h" | |
15 #include "webkit/fileapi/file_system_types.h" | 13 #include "webkit/fileapi/file_system_types.h" |
16 | 14 |
| 15 class GURL; |
| 16 |
| 17 namespace base { |
| 18 class MessageLoopProxy; |
| 19 } |
| 20 |
17 namespace fileapi { | 21 namespace fileapi { |
18 | 22 |
19 class FileSystemPathManager { | 23 class FileSystemPathManager { |
20 public: | 24 public: |
21 FileSystemPathManager(scoped_refptr<base::MessageLoopProxy> file_message_loop, | 25 FileSystemPathManager(scoped_refptr<base::MessageLoopProxy> file_message_loop, |
22 const FilePath& profile_path, | 26 const FilePath& profile_path, |
23 bool is_incognito, | 27 bool is_incognito, |
24 bool allow_file_access_from_files); | 28 bool allow_file_access_from_files); |
| 29 ~FileSystemPathManager(); |
25 | 30 |
26 // Callback for GetFileSystemRootPath. | 31 // Callback for GetFileSystemRootPath. |
27 // 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 |
28 // 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. |
29 // If the request is accepted, |create| is specified for | 34 // If the request is accepted, |create| is specified for |
30 // GetFileSystemRootPath, and the root directory does not exist, it creates | 35 // GetFileSystemRootPath, and the root directory does not exist, it creates |
31 // 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. |
32 typedef Callback3<bool /* success */, | 37 typedef Callback3<bool /* success */, |
33 const FilePath& /* root_path */, | 38 const FilePath& /* root_path */, |
34 const std::string& /* name */>::Type GetRootPathCallback; | 39 const std::string& /* name */>::Type GetRootPathCallback; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const FilePath base_path_; | 81 const FilePath base_path_; |
77 const bool is_incognito_; | 82 const bool is_incognito_; |
78 const bool allow_file_access_from_files_; | 83 const bool allow_file_access_from_files_; |
79 | 84 |
80 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); | 85 DISALLOW_COPY_AND_ASSIGN(FileSystemPathManager); |
81 }; | 86 }; |
82 | 87 |
83 } // namespace fileapi | 88 } // namespace fileapi |
84 | 89 |
85 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ | 90 #endif // WEBKIT_FILEAPI_FILE_SYSTEM_PATH_MANAGER_H_ |
OLD | NEW |