| 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 CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 5 #ifndef CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
| 6 #define CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 6 #define CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 bool Create(const FilePath& path, | 45 bool Create(const FilePath& path, |
| 46 bool exclusive, | 46 bool exclusive, |
| 47 bool is_directory, | 47 bool is_directory, |
| 48 bool recursive, | 48 bool recursive, |
| 49 fileapi::FileSystemCallbackDispatcher* dispatcher); | 49 fileapi::FileSystemCallbackDispatcher* dispatcher); |
| 50 bool Exists(const FilePath& path, | 50 bool Exists(const FilePath& path, |
| 51 bool for_directory, | 51 bool for_directory, |
| 52 fileapi::FileSystemCallbackDispatcher* dispatcher); | 52 fileapi::FileSystemCallbackDispatcher* dispatcher); |
| 53 bool ReadDirectory(const FilePath& path, | 53 bool ReadDirectory(const FilePath& path, |
| 54 fileapi::FileSystemCallbackDispatcher* dispatcher); | 54 fileapi::FileSystemCallbackDispatcher* dispatcher); |
| 55 bool TouchFile(const FilePath& file_path, |
| 56 const base::Time& last_access_time, |
| 57 const base::Time& last_modified_time, |
| 58 fileapi::FileSystemCallbackDispatcher* dispatcher); |
| 55 | 59 |
| 56 private: | 60 private: |
| 57 void DidSucceed(int request_id); | 61 void DidSucceed(int request_id); |
| 58 void DidReadMetadata(int request_id, | 62 void DidReadMetadata(int request_id, |
| 59 const base::PlatformFileInfo& file_info); | 63 const base::PlatformFileInfo& file_info); |
| 60 void DidReadDirectory( | 64 void DidReadDirectory( |
| 61 int request_id, | 65 int request_id, |
| 62 const std::vector<base::file_util_proxy::Entry>& entries, | 66 const std::vector<base::file_util_proxy::Entry>& entries, |
| 63 bool has_more); | 67 bool has_more); |
| 64 void DidFail(int request_id, base::PlatformFileError error_code); | 68 void DidFail(int request_id, base::PlatformFileError error_code); |
| 65 | 69 |
| 66 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; | 70 IDMap<fileapi::FileSystemCallbackDispatcher, IDMapOwnPointer> dispatchers_; |
| 67 | 71 |
| 68 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); | 72 DISALLOW_COPY_AND_ASSIGN(FileSystemDispatcher); |
| 69 }; | 73 }; |
| 70 | 74 |
| 71 #endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ | 75 #endif // CHROME_COMMON_FILE_SYSTEM_FILE_SYSTEM_DISPATCHER_H_ |
| OLD | NEW |