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

Unified Diff: google_apis/drive/files_list_request_runner.cc

Issue 2894513003: Fetch files shared in Team Drives by specifying allTeamDrives corpora. (Closed)
Patch Set: Make comment style consistent with existing one Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/drive/files_list_request_runner.cc
diff --git a/google_apis/drive/files_list_request_runner.cc b/google_apis/drive/files_list_request_runner.cc
index a7f29d6ea07bcec7b07eb8a3c9303918ceacbbfe..3dde3d6c06d05f8e7bb3e90a905b4f61ad5067d9 100644
--- a/google_apis/drive/files_list_request_runner.cc
+++ b/google_apis/drive/files_list_request_runner.cc
@@ -29,6 +29,8 @@ FilesListRequestRunner::~FilesListRequestRunner() {
CancelCallback FilesListRequestRunner::CreateAndStartWithSizeBackoff(
int max_results,
+ FilesListCorpora corpora,
+ const std::string& team_drive_id,
const std::string& q,
const std::string& fields,
const FileListCallback& callback) {
@@ -39,8 +41,9 @@ CancelCallback FilesListRequestRunner::CreateAndStartWithSizeBackoff(
base::MakeUnique<drive::FilesListRequest>(
request_sender_, url_generator_,
base::Bind(&FilesListRequestRunner::OnCompleted,
- weak_ptr_factory_.GetWeakPtr(), max_results, q, fields,
- callback, base::Owned(cancel_callback)));
+ weak_ptr_factory_.GetWeakPtr(), max_results, corpora,
+ team_drive_id, q, fields, callback,
+ base::Owned(cancel_callback)));
request->set_max_results(max_results);
request->set_q(q);
request->set_fields(fields);
@@ -61,6 +64,8 @@ void FilesListRequestRunner::OnCancel(base::Closure* cancel_callback) {
}
void FilesListRequestRunner::OnCompleted(int max_results,
+ FilesListCorpora corpora,
+ const std::string& team_drive_id,
const std::string& q,
const std::string& fields,
const FileListCallback& callback,
@@ -74,7 +79,8 @@ void FilesListRequestRunner::OnCompleted(int max_results,
"Drive.FilesListRequestRunner.ApiErrorCode", error);
if (error == google_apis::DRIVE_RESPONSE_TOO_LARGE && max_results > 1) {
- CreateAndStartWithSizeBackoff(max_results / 2, q, fields, callback);
+ CreateAndStartWithSizeBackoff(max_results / 2, corpora, team_drive_id, q,
+ fields, callback);
return;
}
« no previous file with comments | « google_apis/drive/files_list_request_runner.h ('k') | google_apis/drive/files_list_request_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698