| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 DidGetLocalPath(const FilePath& local_path) { |
| 49 NOTREACHED(); |
| 50 } |
| 51 |
| 48 virtual void DidReadMetadata( | 52 virtual void DidReadMetadata( |
| 49 const base::PlatformFileInfo& info, | 53 const base::PlatformFileInfo& info, |
| 50 const FilePath& platform_path) { | 54 const FilePath& platform_path) { |
| 51 dispatcher_host_->Send(new FileSystemMsg_DidReadMetadata( | 55 dispatcher_host_->Send(new FileSystemMsg_DidReadMetadata( |
| 52 request_id_, info, platform_path)); | 56 request_id_, info, platform_path)); |
| 53 } | 57 } |
| 54 | 58 |
| 55 virtual void DidReadDirectory( | 59 virtual void DidReadDirectory( |
| 56 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { | 60 const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more) { |
| 57 dispatcher_host_->Send(new FileSystemMsg_DidReadDirectory( | 61 dispatcher_host_->Send(new FileSystemMsg_DidReadDirectory( |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 context_, | 272 context_, |
| 269 NULL); | 273 NULL); |
| 270 operations_.AddWithID(operation, request_id); | 274 operations_.AddWithID(operation, request_id); |
| 271 return operation; | 275 return operation; |
| 272 } | 276 } |
| 273 | 277 |
| 274 void FileSystemDispatcherHost::UnregisterOperation(int request_id) { | 278 void FileSystemDispatcherHost::UnregisterOperation(int request_id) { |
| 275 DCHECK(operations_.Lookup(request_id)); | 279 DCHECK(operations_.Lookup(request_id)); |
| 276 operations_.Remove(request_id); | 280 operations_.Remove(request_id); |
| 277 } | 281 } |
| OLD | NEW |