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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" |
12 #include "base/process/process.h" | 13 #include "base/process/process.h" |
13 #include "content/child/child_thread_impl.h" | 14 #include "content/child/child_thread_impl.h" |
14 #include "content/common/fileapi/file_system_messages.h" | 15 #include "content/common/fileapi/file_system_messages.h" |
15 #include "storage/common/fileapi/file_system_info.h" | 16 #include "storage/common/fileapi/file_system_info.h" |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 | 19 |
19 class FileSystemDispatcher::CallbackDispatcher { | 20 class FileSystemDispatcher::CallbackDispatcher { |
20 public: | 21 public: |
21 typedef CallbackDispatcher self; | 22 typedef CallbackDispatcher self; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 int64_t bytes, | 404 int64_t bytes, |
404 bool complete) { | 405 bool complete) { |
405 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); | 406 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); |
406 DCHECK(dispatcher); | 407 DCHECK(dispatcher); |
407 dispatcher->DidWrite(bytes, complete); | 408 dispatcher->DidWrite(bytes, complete); |
408 if (complete) | 409 if (complete) |
409 dispatchers_.Remove(request_id); | 410 dispatchers_.Remove(request_id); |
410 } | 411 } |
411 | 412 |
412 } // namespace content | 413 } // namespace content |
OLD | NEW |