| 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 "content/browser/file_system/file_system_dispatcher_host.h" | 5 #include "content/browser/file_system/file_system_dispatcher_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 virtual ~BrowserFileSystemCallbackDispatcher() { | 40 virtual ~BrowserFileSystemCallbackDispatcher() { |
| 41 dispatcher_host_->UnregisterOperation(request_id_); | 41 dispatcher_host_->UnregisterOperation(request_id_); |
| 42 } | 42 } |
| 43 | 43 |
| 44 virtual void DidSucceed() { | 44 virtual void DidSucceed() { |
| 45 dispatcher_host_->Send(new FileSystemMsg_DidSucceed(request_id_)); | 45 dispatcher_host_->Send(new FileSystemMsg_DidSucceed(request_id_)); |
| 46 } | 46 } |
| 47 | 47 |
| 48 virtual void DidReadMetadata(const base::PlatformFileInfo& info) { | 48 virtual void DidReadMetadata( |
| 49 const base::PlatformFileInfo& info, |
| 50 const FilePath& platform_path) { |
| 49 dispatcher_host_->Send(new FileSystemMsg_DidReadMetadata( | 51 dispatcher_host_->Send(new FileSystemMsg_DidReadMetadata( |
| 50 request_id_, info)); | 52 request_id_, info, platform_path)); |
| 51 } | 53 } |
| 52 | 54 |
| 53 virtual void DidReadDirectory( | 55 virtual void DidReadDirectory( |
| 54 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { | 56 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { |
| 55 dispatcher_host_->Send(new FileSystemMsg_DidReadDirectory( | 57 dispatcher_host_->Send(new FileSystemMsg_DidReadDirectory( |
| 56 request_id_, entries, has_more)); | 58 request_id_, entries, has_more)); |
| 57 } | 59 } |
| 58 | 60 |
| 59 virtual void DidOpenFileSystem(const std::string& name, | 61 virtual void DidOpenFileSystem(const std::string& name, |
| 60 const FilePath& path) { | 62 const FilePath& path) { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 context_, | 239 context_, |
| 238 NULL); | 240 NULL); |
| 239 operations_.AddWithID(operation, request_id); | 241 operations_.AddWithID(operation, request_id); |
| 240 return operation; | 242 return operation; |
| 241 } | 243 } |
| 242 | 244 |
| 243 void FileSystemDispatcherHost::UnregisterOperation(int request_id) { | 245 void FileSystemDispatcherHost::UnregisterOperation(int request_id) { |
| 244 DCHECK(operations_.Lookup(request_id)); | 246 DCHECK(operations_.Lookup(request_id)); |
| 245 operations_.Remove(request_id); | 247 operations_.Remove(request_id); |
| 246 } | 248 } |
| OLD | NEW |