| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/common/fileapi/file_system_dispatcher.h" | 5 #include "content/common/fileapi/file_system_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/process.h" | 7 #include "base/process.h" |
| 8 #include "content/common/child_thread.h" | 8 #include "content/common/child_thread.h" |
| 9 #include "content/common/fileapi/file_system_messages.h" | 9 #include "content/common/fileapi/file_system_messages.h" |
| 10 | 10 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 dispatchers_.Lookup(request_id); | 300 dispatchers_.Lookup(request_id); |
| 301 DCHECK(dispatcher); | 301 DCHECK(dispatcher); |
| 302 dispatcher->DidCreateSnapshotFile(file_info, platform_path); | 302 dispatcher->DidCreateSnapshotFile(file_info, platform_path); |
| 303 dispatchers_.Remove(request_id); | 303 dispatchers_.Remove(request_id); |
| 304 ChildThread::current()->Send( | 304 ChildThread::current()->Send( |
| 305 new FileSystemHostMsg_DidReceiveSnapshotFile(request_id)); | 305 new FileSystemHostMsg_DidReceiveSnapshotFile(request_id)); |
| 306 } | 306 } |
| 307 | 307 |
| 308 void FileSystemDispatcher::OnDidReadDirectory( | 308 void FileSystemDispatcher::OnDidReadDirectory( |
| 309 int request_id, | 309 int request_id, |
| 310 const std::vector<base::FileUtilProxy::Entry>& entries, | 310 const std::vector<fileapi::FileSystemOperation::Entry>& entries, |
| 311 bool has_more) { | 311 bool has_more) { |
| 312 fileapi::FileSystemCallbackDispatcher* dispatcher = | 312 fileapi::FileSystemCallbackDispatcher* dispatcher = |
| 313 dispatchers_.Lookup(request_id); | 313 dispatchers_.Lookup(request_id); |
| 314 DCHECK(dispatcher); | 314 DCHECK(dispatcher); |
| 315 dispatcher->DidReadDirectory(entries, has_more); | 315 dispatcher->DidReadDirectory(entries, has_more); |
| 316 dispatchers_.Remove(request_id); | 316 dispatchers_.Remove(request_id); |
| 317 } | 317 } |
| 318 | 318 |
| 319 void FileSystemDispatcher::OnDidFail( | 319 void FileSystemDispatcher::OnDidFail( |
| 320 int request_id, base::PlatformFileError error_code) { | 320 int request_id, base::PlatformFileError error_code) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 343 fileapi::FileSystemCallbackDispatcher* dispatcher = | 343 fileapi::FileSystemCallbackDispatcher* dispatcher = |
| 344 dispatchers_.Lookup(request_id); | 344 dispatchers_.Lookup(request_id); |
| 345 DCHECK(dispatcher); | 345 DCHECK(dispatcher); |
| 346 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file), | 346 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file), |
| 347 file_open_id, | 347 file_open_id, |
| 348 quota_policy); | 348 quota_policy); |
| 349 dispatchers_.Remove(request_id); | 349 dispatchers_.Remove(request_id); |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace content | 352 } // namespace content |
| OLD | NEW |