| 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 #include "chrome/browser/chromeos/file_system_provider/throttled_file_system.h" | 5 #include "chrome/browser/chromeos/file_system_provider/throttled_file_system.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 const base::FilePath& entry_path, | 176 const base::FilePath& entry_path, |
| 177 bool recursive, | 177 bool recursive, |
| 178 storage::WatcherManager::ChangeType change_type, | 178 storage::WatcherManager::ChangeType change_type, |
| 179 scoped_ptr<ProvidedFileSystemObserver::Changes> changes, | 179 scoped_ptr<ProvidedFileSystemObserver::Changes> changes, |
| 180 const std::string& tag, | 180 const std::string& tag, |
| 181 const storage::AsyncFileUtil::StatusCallback& callback) { | 181 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 182 return file_system_->Notify(entry_path, recursive, change_type, | 182 return file_system_->Notify(entry_path, recursive, change_type, |
| 183 changes.Pass(), tag, callback); | 183 changes.Pass(), tag, callback); |
| 184 } | 184 } |
| 185 | 185 |
| 186 void ThrottledFileSystem::Configure( |
| 187 const storage::AsyncFileUtil::StatusCallback& callback) { |
| 188 return file_system_->Configure(callback); |
| 189 } |
| 190 |
| 186 base::WeakPtr<ProvidedFileSystemInterface> ThrottledFileSystem::GetWeakPtr() { | 191 base::WeakPtr<ProvidedFileSystemInterface> ThrottledFileSystem::GetWeakPtr() { |
| 187 return weak_ptr_factory_.GetWeakPtr(); | 192 return weak_ptr_factory_.GetWeakPtr(); |
| 188 } | 193 } |
| 189 | 194 |
| 190 void ThrottledFileSystem::Abort(int queue_token) { | 195 void ThrottledFileSystem::Abort(int queue_token) { |
| 191 open_queue_->Abort(queue_token); | 196 open_queue_->Abort(queue_token); |
| 192 } | 197 } |
| 193 | 198 |
| 194 void ThrottledFileSystem::OnOpenFileCompleted(int queue_token, | 199 void ThrottledFileSystem::OnOpenFileCompleted(int queue_token, |
| 195 const OpenFileCallback& callback, | 200 const OpenFileCallback& callback, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 217 | 222 |
| 218 const int queue_token = it->second; | 223 const int queue_token = it->second; |
| 219 open_queue_->Complete(queue_token); | 224 open_queue_->Complete(queue_token); |
| 220 opened_files_.erase(file_handle); | 225 opened_files_.erase(file_handle); |
| 221 | 226 |
| 222 callback.Run(result); | 227 callback.Run(result); |
| 223 } | 228 } |
| 224 | 229 |
| 225 } // namespace file_system_provider | 230 } // namespace file_system_provider |
| 226 } // namespace chromeos | 231 } // namespace chromeos |
| OLD | NEW |