Commit eb453f1b authored by Bailey Berro's avatar Bailey Berro Committed by Commit Bot

Switch to new SmbFileSystem readdir method

-Switches SmbFileSystem to using the new Start/Continue ReadDirectory flow

Bug: chromium:757625
Change-Id: I7e6501b90c4158775440871125dba0d05df7b508
Reviewed-on: https://chromium-review.googlesource.com/1231918
Commit-Queue: Bailey Berro <baileyberro@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595288}
parent 4485a825
......@@ -230,16 +230,11 @@ AbortCallback SmbFileSystem::ExecuteAction(
AbortCallback SmbFileSystem::ReadDirectory(
const base::FilePath& directory_path,
storage::AsyncFileUtil::ReadDirectoryCallback callback) {
base::ElapsedTimer metrics_timer;
OperationId operation_id = task_queue_.GetNextOperationId();
auto reply =
base::BindOnce(&SmbFileSystem::HandleRequestReadDirectoryCallback,
AsWeakPtr(), callback, std::move(metrics_timer));
SmbTask task = base::BindOnce(&SmbProviderClient::ReadDirectory,
GetWeakSmbProviderClient(), GetMountId(),
directory_path, std::move(reply));
StartReadDirectory(directory_path, operation_id, std::move(callback));
return EnqueueTaskAndGetCallback(std::move(task));
return CreateAbortCallback(operation_id);
}
AbortCallback SmbFileSystem::OpenFile(const base::FilePath& file_path,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment