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/common/file_system/file_system_dispatcher.h" | 5 #include "content/common/file_system/file_system_dispatcher.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "content/common/child_thread.h" | 8 #include "content/common/child_thread.h" |
9 #include "content/common/file_system_messages.h" | 9 #include "content/common/file_system_messages.h" |
10 | 10 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 void FileSystemDispatcher::OnDidSucceed(int request_id) { | 229 void FileSystemDispatcher::OnDidSucceed(int request_id) { |
230 fileapi::FileSystemCallbackDispatcher* dispatcher = | 230 fileapi::FileSystemCallbackDispatcher* dispatcher = |
231 dispatchers_.Lookup(request_id); | 231 dispatchers_.Lookup(request_id); |
232 DCHECK(dispatcher); | 232 DCHECK(dispatcher); |
233 dispatcher->DidSucceed(); | 233 dispatcher->DidSucceed(); |
234 dispatchers_.Remove(request_id); | 234 dispatchers_.Remove(request_id); |
235 } | 235 } |
236 | 236 |
237 void FileSystemDispatcher::OnDidReadMetadata( | 237 void FileSystemDispatcher::OnDidReadMetadata( |
238 int request_id, const base::PlatformFileInfo& file_info) { | 238 int request_id, const base::PlatformFileInfo& file_info, |
| 239 const FilePath& platform_path) { |
239 fileapi::FileSystemCallbackDispatcher* dispatcher = | 240 fileapi::FileSystemCallbackDispatcher* dispatcher = |
240 dispatchers_.Lookup(request_id); | 241 dispatchers_.Lookup(request_id); |
241 DCHECK(dispatcher); | 242 DCHECK(dispatcher); |
242 dispatcher->DidReadMetadata(file_info); | 243 dispatcher->DidReadMetadata(file_info, platform_path); |
243 dispatchers_.Remove(request_id); | 244 dispatchers_.Remove(request_id); |
244 } | 245 } |
245 | 246 |
246 void FileSystemDispatcher::OnDidReadDirectory( | 247 void FileSystemDispatcher::OnDidReadDirectory( |
247 int request_id, | 248 int request_id, |
248 const std::vector<base::FileUtilProxy::Entry>& entries, | 249 const std::vector<base::FileUtilProxy::Entry>& entries, |
249 bool has_more) { | 250 bool has_more) { |
250 fileapi::FileSystemCallbackDispatcher* dispatcher = | 251 fileapi::FileSystemCallbackDispatcher* dispatcher = |
251 dispatchers_.Lookup(request_id); | 252 dispatchers_.Lookup(request_id); |
252 DCHECK(dispatcher); | 253 DCHECK(dispatcher); |
(...skipping 12 matching lines...) Expand all Loading... |
265 | 266 |
266 void FileSystemDispatcher::OnDidWrite( | 267 void FileSystemDispatcher::OnDidWrite( |
267 int request_id, int64 bytes, bool complete) { | 268 int request_id, int64 bytes, bool complete) { |
268 fileapi::FileSystemCallbackDispatcher* dispatcher = | 269 fileapi::FileSystemCallbackDispatcher* dispatcher = |
269 dispatchers_.Lookup(request_id); | 270 dispatchers_.Lookup(request_id); |
270 DCHECK(dispatcher); | 271 DCHECK(dispatcher); |
271 dispatcher->DidWrite(bytes, complete); | 272 dispatcher->DidWrite(bytes, complete); |
272 if (complete) | 273 if (complete) |
273 dispatchers_.Remove(request_id); | 274 dispatchers_.Remove(request_id); |
274 } | 275 } |
OLD | NEW |