| 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/file_system_dispatcher_host.h" | 5 #include "chrome/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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 virtual void DidSucceed() { | 47 virtual void DidSucceed() { |
| 48 dispatcher_host_->Send(new ViewMsg_FileSystem_DidSucceed(request_id_)); | 48 dispatcher_host_->Send(new ViewMsg_FileSystem_DidSucceed(request_id_)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void DidReadMetadata(const base::PlatformFileInfo& info) { | 51 virtual void DidReadMetadata(const base::PlatformFileInfo& info) { |
| 52 dispatcher_host_->Send(new ViewMsg_FileSystem_DidReadMetadata( | 52 dispatcher_host_->Send(new ViewMsg_FileSystem_DidReadMetadata( |
| 53 request_id_, info)); | 53 request_id_, info)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 virtual void DidReadDirectory( | 56 virtual void DidReadDirectory( |
| 57 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { | 57 const std::vector<base::FileUtilProxyBase::Entry>& entries, |
| 58 bool has_more) { |
| 58 dispatcher_host_->Send(new ViewMsg_FileSystem_DidReadDirectory( | 59 dispatcher_host_->Send(new ViewMsg_FileSystem_DidReadDirectory( |
| 59 request_id_, entries, has_more)); | 60 request_id_, entries, has_more)); |
| 60 } | 61 } |
| 61 | 62 |
| 62 virtual void DidOpenFileSystem(const std::string& name, | 63 virtual void DidOpenFileSystem(const std::string& name, |
| 63 const FilePath& path) { | 64 const FilePath& path) { |
| 64 dispatcher_host_->Send( | 65 dispatcher_host_->Send( |
| 65 new ViewMsg_OpenFileSystemRequest_Complete( | 66 new ViewMsg_OpenFileSystemRequest_Complete( |
| 66 request_id_, !path.empty(), name, path)); | 67 request_id_, !path.empty(), name, path)); |
| 67 } | 68 } |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | 242 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), |
| 242 context_); | 243 context_); |
| 243 operations_.AddWithID(operation, request_id); | 244 operations_.AddWithID(operation, request_id); |
| 244 return operation; | 245 return operation; |
| 245 } | 246 } |
| 246 | 247 |
| 247 void FileSystemDispatcherHost::UnregisterOperation(int request_id) { | 248 void FileSystemDispatcherHost::UnregisterOperation(int request_id) { |
| 248 DCHECK(operations_.Lookup(request_id)); | 249 DCHECK(operations_.Lookup(request_id)); |
| 249 operations_.Remove(request_id); | 250 operations_.Remove(request_id); |
| 250 } | 251 } |
| OLD | NEW |