| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_THROTTLED_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_THROTTLED_FILE_SYSTEM_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_THROTTLED_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_THROTTLED_FILE_SYSTEM_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 #include <vector> | 11 #include <vector> |
| 10 | 12 |
| 13 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 14 #include "chrome/browser/chromeos/file_system_provider/abort_callback.h" | 17 #include "chrome/browser/chromeos/file_system_provider/abort_callback.h" |
| 15 #include "chrome/browser/chromeos/file_system_provider/provided_file_system.h" | 18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system.h" |
| 16 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" | 19 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_info
.h" |
| 17 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" | 20 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_inte
rface.h" |
| 18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse
rver.h" | 21 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse
rver.h" |
| 19 #include "storage/browser/fileapi/async_file_util.h" | 22 #include "storage/browser/fileapi/async_file_util.h" |
| 20 #include "storage/browser/fileapi/watcher_manager.h" | 23 #include "storage/browser/fileapi/watcher_manager.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const base::FilePath& directory_path, | 62 const base::FilePath& directory_path, |
| 60 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) override; | 63 const storage::AsyncFileUtil::ReadDirectoryCallback& callback) override; |
| 61 AbortCallback OpenFile(const base::FilePath& file_path, | 64 AbortCallback OpenFile(const base::FilePath& file_path, |
| 62 OpenFileMode mode, | 65 OpenFileMode mode, |
| 63 const OpenFileCallback& callback) override; | 66 const OpenFileCallback& callback) override; |
| 64 AbortCallback CloseFile( | 67 AbortCallback CloseFile( |
| 65 int file_handle, | 68 int file_handle, |
| 66 const storage::AsyncFileUtil::StatusCallback& callback) override; | 69 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 67 AbortCallback ReadFile(int file_handle, | 70 AbortCallback ReadFile(int file_handle, |
| 68 net::IOBuffer* buffer, | 71 net::IOBuffer* buffer, |
| 69 int64 offset, | 72 int64_t offset, |
| 70 int length, | 73 int length, |
| 71 const ReadChunkReceivedCallback& callback) override; | 74 const ReadChunkReceivedCallback& callback) override; |
| 72 AbortCallback CreateDirectory( | 75 AbortCallback CreateDirectory( |
| 73 const base::FilePath& directory_path, | 76 const base::FilePath& directory_path, |
| 74 bool recursive, | 77 bool recursive, |
| 75 const storage::AsyncFileUtil::StatusCallback& callback) override; | 78 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 76 AbortCallback DeleteEntry( | 79 AbortCallback DeleteEntry( |
| 77 const base::FilePath& entry_path, | 80 const base::FilePath& entry_path, |
| 78 bool recursive, | 81 bool recursive, |
| 79 const storage::AsyncFileUtil::StatusCallback& callback) override; | 82 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 80 AbortCallback CreateFile( | 83 AbortCallback CreateFile( |
| 81 const base::FilePath& file_path, | 84 const base::FilePath& file_path, |
| 82 const storage::AsyncFileUtil::StatusCallback& callback) override; | 85 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 83 AbortCallback CopyEntry( | 86 AbortCallback CopyEntry( |
| 84 const base::FilePath& source_path, | 87 const base::FilePath& source_path, |
| 85 const base::FilePath& target_path, | 88 const base::FilePath& target_path, |
| 86 const storage::AsyncFileUtil::StatusCallback& callback) override; | 89 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 87 AbortCallback MoveEntry( | 90 AbortCallback MoveEntry( |
| 88 const base::FilePath& source_path, | 91 const base::FilePath& source_path, |
| 89 const base::FilePath& target_path, | 92 const base::FilePath& target_path, |
| 90 const storage::AsyncFileUtil::StatusCallback& callback) override; | 93 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 91 AbortCallback Truncate( | 94 AbortCallback Truncate( |
| 92 const base::FilePath& file_path, | 95 const base::FilePath& file_path, |
| 93 int64 length, | 96 int64_t length, |
| 94 const storage::AsyncFileUtil::StatusCallback& callback) override; | 97 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 95 AbortCallback WriteFile( | 98 AbortCallback WriteFile( |
| 96 int file_handle, | 99 int file_handle, |
| 97 net::IOBuffer* buffer, | 100 net::IOBuffer* buffer, |
| 98 int64 offset, | 101 int64_t offset, |
| 99 int length, | 102 int length, |
| 100 const storage::AsyncFileUtil::StatusCallback& callback) override; | 103 const storage::AsyncFileUtil::StatusCallback& callback) override; |
| 101 AbortCallback AddWatcher( | 104 AbortCallback AddWatcher( |
| 102 const GURL& origin, | 105 const GURL& origin, |
| 103 const base::FilePath& entry_path, | 106 const base::FilePath& entry_path, |
| 104 bool recursive, | 107 bool recursive, |
| 105 bool persistent, | 108 bool persistent, |
| 106 const storage::AsyncFileUtil::StatusCallback& callback, | 109 const storage::AsyncFileUtil::StatusCallback& callback, |
| 107 const storage::WatcherManager::NotificationCallback& | 110 const storage::WatcherManager::NotificationCallback& |
| 108 notification_callback) override; | 111 notification_callback) override; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 std::map<int, int> opened_files_; | 153 std::map<int, int> opened_files_; |
| 151 | 154 |
| 152 base::WeakPtrFactory<ThrottledFileSystem> weak_ptr_factory_; | 155 base::WeakPtrFactory<ThrottledFileSystem> weak_ptr_factory_; |
| 153 DISALLOW_COPY_AND_ASSIGN(ThrottledFileSystem); | 156 DISALLOW_COPY_AND_ASSIGN(ThrottledFileSystem); |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 } // namespace file_system_provider | 159 } // namespace file_system_provider |
| 157 } // namespace chromeos | 160 } // namespace chromeos |
| 158 | 161 |
| 159 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_THROTTLED_FILE_SYSTEM_H_ | 162 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_THROTTLED_FILE_SYSTEM_H_ |
| OLD | NEW |