| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H
_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 private: | 166 private: |
| 167 typedef std::map<base::FilePath, linked_ptr<FakeEntry> > Entries; | 167 typedef std::map<base::FilePath, linked_ptr<FakeEntry> > Entries; |
| 168 typedef std::map<int, base::FilePath> OpenedFilesMap; | 168 typedef std::map<int, base::FilePath> OpenedFilesMap; |
| 169 | 169 |
| 170 // Utility function for posting a task which can be aborted by calling the | 170 // Utility function for posting a task which can be aborted by calling the |
| 171 // returned callback. | 171 // returned callback. |
| 172 AbortCallback PostAbortableTask(const base::Closure& callback); | 172 AbortCallback PostAbortableTask(const base::Closure& callback); |
| 173 | 173 |
| 174 // Aborts a request. |task_id| refers to a posted callback returning a | 174 // Aborts a request. |task_id| refers to a posted callback returning a |
| 175 // response for the operation, which will be cancelled, hence not called. | 175 // response for the operation, which will be cancelled, hence not called. |
| 176 void Abort(int task_id, | 176 void Abort(int task_id); |
| 177 const storage::AsyncFileUtil::StatusCallback& callback); | |
| 178 | 177 |
| 179 // Aborts a request. |task_ids| refers to a vector of posted callbacks | 178 // Aborts a request. |task_ids| refers to a vector of posted callbacks |
| 180 // returning a response for the operation, which will be cancelled, hence not | 179 // returning a response for the operation, which will be cancelled, hence not |
| 181 // called. | 180 // called. |
| 182 void AbortMany(const std::vector<int>& task_ids, | 181 void AbortMany(const std::vector<int>& task_ids); |
| 183 const storage::AsyncFileUtil::StatusCallback& callback); | |
| 184 | 182 |
| 185 ProvidedFileSystemInfo file_system_info_; | 183 ProvidedFileSystemInfo file_system_info_; |
| 186 Entries entries_; | 184 Entries entries_; |
| 187 OpenedFilesMap opened_files_; | 185 OpenedFilesMap opened_files_; |
| 188 int last_file_handle_; | 186 int last_file_handle_; |
| 189 base::CancelableTaskTracker tracker_; | 187 base::CancelableTaskTracker tracker_; |
| 190 ObserverList<ProvidedFileSystemObserver> observers_; | 188 ObserverList<ProvidedFileSystemObserver> observers_; |
| 191 Watchers watchers_; | 189 Watchers watchers_; |
| 192 | 190 |
| 193 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; | 191 base::WeakPtrFactory<FakeProvidedFileSystem> weak_ptr_factory_; |
| 194 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); | 192 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); |
| 195 }; | 193 }; |
| 196 | 194 |
| 197 } // namespace file_system_provider | 195 } // namespace file_system_provider |
| 198 } // namespace chromeos | 196 } // namespace chromeos |
| 199 | 197 |
| 200 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ | 198 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE
M_H_ |
| OLD | NEW |