| 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/child/fileapi/file_system_dispatcher.h" | 5 #include "content/child/fileapi/file_system_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
| 11 #include "content/child/child_thread.h" | 11 #include "content/child/child_thread.h" |
| 12 #include "content/common/fileapi/file_system_messages.h" | 12 #include "content/common/fileapi/file_system_messages.h" |
| 13 #include "webkit/common/fileapi/file_system_info.h" | 13 #include "storage/common/fileapi/file_system_info.h" |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class FileSystemDispatcher::CallbackDispatcher { | 17 class FileSystemDispatcher::CallbackDispatcher { |
| 18 public: | 18 public: |
| 19 typedef CallbackDispatcher self; | 19 typedef CallbackDispatcher self; |
| 20 typedef FileSystemDispatcher::StatusCallback StatusCallback; | 20 typedef FileSystemDispatcher::StatusCallback StatusCallback; |
| 21 typedef FileSystemDispatcher::MetadataCallback MetadataCallback; | 21 typedef FileSystemDispatcher::MetadataCallback MetadataCallback; |
| 22 typedef FileSystemDispatcher::ReadDirectoryCallback ReadDirectoryCallback; | 22 typedef FileSystemDispatcher::ReadDirectoryCallback ReadDirectoryCallback; |
| 23 typedef FileSystemDispatcher::OpenFileSystemCallback OpenFileSystemCallback; | 23 typedef FileSystemDispatcher::OpenFileSystemCallback OpenFileSystemCallback; |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 void FileSystemDispatcher::OnDidWrite( | 395 void FileSystemDispatcher::OnDidWrite( |
| 396 int request_id, int64 bytes, bool complete) { | 396 int request_id, int64 bytes, bool complete) { |
| 397 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); | 397 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); |
| 398 DCHECK(dispatcher); | 398 DCHECK(dispatcher); |
| 399 dispatcher->DidWrite(bytes, complete); | 399 dispatcher->DidWrite(bytes, complete); |
| 400 if (complete) | 400 if (complete) |
| 401 dispatchers_.Remove(request_id); | 401 dispatchers_.Remove(request_id); |
| 402 } | 402 } |
| 403 | 403 |
| 404 } // namespace content | 404 } // namespace content |
| OLD | NEW |