Make ReadDirectoryEntriesCallback & GetFilesystemMetadataCallback OnceCallback.
Start changing various file system callback types to be once callback rather
than the default repeating callback. They are only repeating callback because
that was the previous default and this can introduce subtle and hard to find
bugs that would be more obvious if the types were once callback. An example of
this is crbug.com/875140.
Bug: 875700
Change-Id: I3f37be3ca9f7622116db83fae287056203ff723e
Reviewed-on: https://chromium-review.googlesource.com/1187859
Reviewed-by: Joel Hockey <[email protected]>
Reviewed-by: Anand Mistry <[email protected]>
Commit-Queue: Stuart Langley <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586173}
diff --git a/components/drive/chromeos/directory_loader.h b/components/drive/chromeos/directory_loader.h
index 344e33e2..b1b25886 100644
--- a/components/drive/chromeos/directory_loader.h
+++ b/components/drive/chromeos/directory_loader.h
@@ -63,7 +63,7 @@
// |entries_callback| can be null.
// |completion_callback| must not be null.
void ReadDirectory(const base::FilePath& directory_path,
- const ReadDirectoryEntriesCallback& entries_callback,
+ ReadDirectoryEntriesCallback entries_callback,
const FileOperationCallback& completion_callback);
private:
@@ -73,14 +73,14 @@
// Part of ReadDirectory().
void ReadDirectoryAfterGetEntry(
const base::FilePath& directory_path,
- const ReadDirectoryEntriesCallback& entries_callback,
+ ReadDirectoryEntriesCallback entries_callback,
const FileOperationCallback& completion_callback,
bool should_try_loading_parent,
const ResourceEntry* entry,
FileError error);
void ReadDirectoryAfterLoadParent(
const base::FilePath& directory_path,
- const ReadDirectoryEntriesCallback& entries_callback,
+ ReadDirectoryEntriesCallback entries_callback,
const FileOperationCallback& completion_callback,
FileError error);
void ReadDirectoryAfterGetRootFolderId(