Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: content/child/fileapi/file_system_dispatcher.cc

Issue 187393004: Keep IPC related state as long as readDirectory returns has_more==true (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/child/fileapi/file_system_dispatcher.h" 5 #include "content/child/fileapi/file_system_dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/process/process.h" 10 #include "base/process/process.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 dispatchers_.Remove(request_id); 383 dispatchers_.Remove(request_id);
384 } 384 }
385 385
386 void FileSystemDispatcher::OnDidReadDirectory( 386 void FileSystemDispatcher::OnDidReadDirectory(
387 int request_id, 387 int request_id,
388 const std::vector<fileapi::DirectoryEntry>& entries, 388 const std::vector<fileapi::DirectoryEntry>& entries,
389 bool has_more) { 389 bool has_more) {
390 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); 390 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id);
391 DCHECK(dispatcher); 391 DCHECK(dispatcher);
392 dispatcher->DidReadDirectory(entries, has_more); 392 dispatcher->DidReadDirectory(entries, has_more);
393 dispatchers_.Remove(request_id); 393 if (!has_more)
394 dispatchers_.Remove(request_id);
394 } 395 }
395 396
396 void FileSystemDispatcher::OnDidFail( 397 void FileSystemDispatcher::OnDidFail(
397 int request_id, base::File::Error error_code) { 398 int request_id, base::File::Error error_code) {
398 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); 399 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id);
399 DCHECK(dispatcher); 400 DCHECK(dispatcher);
400 dispatcher->DidFail(error_code); 401 dispatcher->DidFail(error_code);
401 dispatchers_.Remove(request_id); 402 dispatchers_.Remove(request_id);
402 } 403 }
403 404
(...skipping 13 matching lines...) Expand all
417 quota::QuotaLimitType quota_policy) { 418 quota::QuotaLimitType quota_policy) {
418 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id); 419 CallbackDispatcher* dispatcher = dispatchers_.Lookup(request_id);
419 DCHECK(dispatcher); 420 DCHECK(dispatcher);
420 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file), 421 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file),
421 file_open_id, 422 file_open_id,
422 quota_policy); 423 quota_policy);
423 dispatchers_.Remove(request_id); 424 dispatchers_.Remove(request_id);
424 } 425 }
425 426
426 } // namespace content 427 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698