| 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/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/process.h" | 8 #include "base/process.h" |
| 9 #include "content/common/child_thread.h" | 9 #include "content/common/child_thread.h" |
| 10 #include "content/common/fileapi/file_system_messages.h" | 10 #include "content/common/fileapi/file_system_messages.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 int request_id, int64 bytes, bool complete) { | 344 int request_id, int64 bytes, bool complete) { |
| 345 fileapi::FileSystemCallbackDispatcher* dispatcher = | 345 fileapi::FileSystemCallbackDispatcher* dispatcher = |
| 346 dispatchers_.Lookup(request_id); | 346 dispatchers_.Lookup(request_id); |
| 347 DCHECK(dispatcher); | 347 DCHECK(dispatcher); |
| 348 dispatcher->DidWrite(bytes, complete); | 348 dispatcher->DidWrite(bytes, complete); |
| 349 if (complete) | 349 if (complete) |
| 350 dispatchers_.Remove(request_id); | 350 dispatchers_.Remove(request_id); |
| 351 } | 351 } |
| 352 | 352 |
| 353 void FileSystemDispatcher::OnDidOpenFile( | 353 void FileSystemDispatcher::OnDidOpenFile( |
| 354 int request_id, IPC::PlatformFileForTransit file) { | 354 int request_id, |
| 355 IPC::PlatformFileForTransit file, |
| 356 quota::QuotaLimitType quota_limit_type) { |
| 355 fileapi::FileSystemCallbackDispatcher* dispatcher = | 357 fileapi::FileSystemCallbackDispatcher* dispatcher = |
| 356 dispatchers_.Lookup(request_id); | 358 dispatchers_.Lookup(request_id); |
| 357 DCHECK(dispatcher); | 359 DCHECK(dispatcher); |
| 358 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file)); | 360 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file), |
| 361 quota_limit_type); |
| 359 dispatchers_.Remove(request_id); | 362 dispatchers_.Remove(request_id); |
| 360 } | 363 } |
| 361 | 364 |
| 362 } // namespace content | 365 } // namespace content |
| OLD | NEW |