| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/file_system/browser_file_system_callback_dispatcher.h" | 5 #include "chrome/browser/file_system/browser_file_system_callback_dispatcher.h" |
| 6 | 6 |
| 7 #include "chrome/browser/file_system/file_system_dispatcher_host.h" | 7 #include "chrome/browser/file_system/file_system_dispatcher_host.h" |
| 8 | 8 |
| 9 BrowserFileSystemCallbackDispatcher::BrowserFileSystemCallbackDispatcher( | 9 BrowserFileSystemCallbackDispatcher::BrowserFileSystemCallbackDispatcher( |
| 10 FileSystemDispatcherHost* dispatcher_host, int request_id) | 10 FileSystemDispatcherHost* dispatcher_host, int request_id) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 const string16&, const FilePath&) { | 36 const string16&, const FilePath&) { |
| 37 NOTREACHED(); | 37 NOTREACHED(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void BrowserFileSystemCallbackDispatcher::DidFail( | 40 void BrowserFileSystemCallbackDispatcher::DidFail( |
| 41 base::PlatformFileError error_code) { | 41 base::PlatformFileError error_code) { |
| 42 dispatcher_host_->Send(new ViewMsg_FileSystem_DidFail( | 42 dispatcher_host_->Send(new ViewMsg_FileSystem_DidFail( |
| 43 request_id_, error_code)); | 43 request_id_, error_code)); |
| 44 dispatcher_host_->RemoveCompletedOperation(request_id_); | 44 dispatcher_host_->RemoveCompletedOperation(request_id_); |
| 45 } | 45 } |
| 46 |
| 47 void BrowserFileSystemCallbackDispatcher::DidWrite( |
| 48 int64 bytes, |
| 49 bool complete) { |
| 50 dispatcher_host_->Send(new ViewMsg_FileSystem_DidWrite( |
| 51 request_id_, bytes, complete)); |
| 52 if (complete) |
| 53 dispatcher_host_->RemoveCompletedOperation(request_id_); |
| 54 } |
| OLD | NEW |