Commit 979cb165 authored by Josip Sokcevic's avatar Josip Sokcevic Committed by Commit Bot

Return CancelCallbackOnce in drive GetAllFileList

Return of GetAllFileList is not used anywhere so it's safe to convert to
CancelCallbackOnce.

Bug: 1007686
Change-Id: I57ff303b8d34fab9926199615a95eb0e81937e31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2304952Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Cr-Commit-Position: refs/heads/master@{#790649}
parent 444e9674
...@@ -306,11 +306,11 @@ google_apis::CancelCallbackOnce DriveServiceOnWorker::GetAllTeamDriveList( ...@@ -306,11 +306,11 @@ google_apis::CancelCallbackOnce DriveServiceOnWorker::GetAllTeamDriveList(
return google_apis::CancelCallbackOnce(); return google_apis::CancelCallbackOnce();
} }
google_apis::CancelCallback DriveServiceOnWorker::GetAllFileList( google_apis::CancelCallbackOnce DriveServiceOnWorker::GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) { const google_apis::FileListCallback& callback) {
NOTREACHED(); NOTREACHED();
return google_apis::CancelCallback(); return google_apis::CancelCallbackOnce();
} }
google_apis::CancelCallback DriveServiceOnWorker::Search( google_apis::CancelCallback DriveServiceOnWorker::Search(
......
...@@ -117,7 +117,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface { ...@@ -117,7 +117,7 @@ class DriveServiceOnWorker : public drive::DriveServiceInterface {
void ClearRefreshToken() override; void ClearRefreshToken() override;
google_apis::CancelCallbackOnce GetAllTeamDriveList( google_apis::CancelCallbackOnce GetAllTeamDriveList(
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetAllFileList( google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback Search( google_apis::CancelCallback Search(
......
...@@ -294,7 +294,7 @@ CancelCallbackOnce DriveAPIService::GetAllTeamDriveList( ...@@ -294,7 +294,7 @@ CancelCallbackOnce DriveAPIService::GetAllTeamDriveList(
return sender_->StartRequestWithAuthRetry(std::move(request)); return sender_->StartRequestWithAuthRetry(std::move(request));
} }
CancelCallback DriveAPIService::GetAllFileList( CancelCallbackOnce DriveAPIService::GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const FileListCallback& callback) { const FileListCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
......
...@@ -131,7 +131,7 @@ class DriveAPIService : public DriveServiceInterface, ...@@ -131,7 +131,7 @@ class DriveAPIService : public DriveServiceInterface,
std::string GetRootResourceId() const override; std::string GetRootResourceId() const override;
google_apis::CancelCallbackOnce GetAllTeamDriveList( google_apis::CancelCallbackOnce GetAllTeamDriveList(
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetAllFileList( google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileListInDirectory( google_apis::CancelCallback GetFileListInDirectory(
......
...@@ -217,7 +217,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface { ...@@ -217,7 +217,7 @@ class DriveServiceInterface : public DriveServiceBatchOperationsInterface {
// default corpus, otherwise will fetch the file list for the specified // default corpus, otherwise will fetch the file list for the specified
// team drive. // team drive.
// |callback| must not be null. // |callback| must not be null.
virtual google_apis::CancelCallback GetAllFileList( virtual google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) = 0; const google_apis::FileListCallback& callback) = 0;
......
...@@ -58,10 +58,10 @@ CancelCallbackOnce DummyDriveService::GetAllTeamDriveList( ...@@ -58,10 +58,10 @@ CancelCallbackOnce DummyDriveService::GetAllTeamDriveList(
return CancelCallbackOnce(); return CancelCallbackOnce();
} }
CancelCallback DummyDriveService::GetAllFileList( CancelCallbackOnce DummyDriveService::GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const FileListCallback& callback) { const FileListCallback& callback) {
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback DummyDriveService::GetFileListInDirectory( CancelCallback DummyDriveService::GetFileListInDirectory(
......
...@@ -35,7 +35,7 @@ class DummyDriveService : public DriveServiceInterface { ...@@ -35,7 +35,7 @@ class DummyDriveService : public DriveServiceInterface {
std::string GetRootResourceId() const override; std::string GetRootResourceId() const override;
google_apis::CancelCallbackOnce GetAllTeamDriveList( google_apis::CancelCallbackOnce GetAllTeamDriveList(
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetAllFileList( google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileListInDirectory( google_apis::CancelCallback GetFileListInDirectory(
......
...@@ -402,7 +402,7 @@ CancelCallbackOnce FakeDriveService::GetAllTeamDriveList( ...@@ -402,7 +402,7 @@ CancelCallbackOnce FakeDriveService::GetAllTeamDriveList(
return CancelCallbackOnce(); return CancelCallbackOnce();
} }
CancelCallback FakeDriveService::GetAllFileList( CancelCallbackOnce FakeDriveService::GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const FileListCallback& callback) { const FileListCallback& callback) {
DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(thread_checker_.CalledOnValidThread());
...@@ -420,7 +420,7 @@ CancelCallback FakeDriveService::GetAllFileList( ...@@ -420,7 +420,7 @@ CancelCallback FakeDriveService::GetAllFileList(
0, // start offset 0, // start offset
default_max_results_, &file_list_load_count_, default_max_results_, &file_list_load_count_,
base::BindOnce(&FileListCallbackAdapter, callback)); base::BindOnce(&FileListCallbackAdapter, callback));
return CancelCallback(); return CancelCallbackOnce();
} }
CancelCallback FakeDriveService::GetFileListInDirectory( CancelCallback FakeDriveService::GetFileListInDirectory(
......
...@@ -135,7 +135,7 @@ class FakeDriveService : public DriveServiceInterface { ...@@ -135,7 +135,7 @@ class FakeDriveService : public DriveServiceInterface {
void ClearRefreshToken() override; void ClearRefreshToken() override;
google_apis::CancelCallbackOnce GetAllTeamDriveList( google_apis::CancelCallbackOnce GetAllTeamDriveList(
google_apis::TeamDriveListCallback callback) override; google_apis::TeamDriveListCallback callback) override;
google_apis::CancelCallback GetAllFileList( google_apis::CancelCallbackOnce GetAllFileList(
const std::string& team_drive_id, const std::string& team_drive_id,
const google_apis::FileListCallback& callback) override; const google_apis::FileListCallback& callback) override;
google_apis::CancelCallback GetFileListInDirectory( google_apis::CancelCallback GetFileListInDirectory(
......
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