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

Side by Side Diff: google_apis/drive/drive_api_requests.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 unified diff | Download patch
« no previous file with comments | « google_apis/drive/drive_api_requests.h ('k') | google_apis/drive/drive_api_url_generator.h » ('j') | 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 "google_apis/drive/drive_api_requests.h" 5 #include "google_apis/drive/drive_api_requests.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 550 }
551 551
552 TeamDriveListRequest::~TeamDriveListRequest() {} 552 TeamDriveListRequest::~TeamDriveListRequest() {}
553 553
554 GURL TeamDriveListRequest::GetURLInternal() const { 554 GURL TeamDriveListRequest::GetURLInternal() const {
555 return url_generator_.GetTeamDriveListUrl(max_results_, page_token_); 555 return url_generator_.GetTeamDriveListUrl(max_results_, page_token_);
556 } 556 }
557 557
558 //============================= FilesListRequest ============================= 558 //============================= FilesListRequest =============================
559 559
560 FilesListRequest::FilesListRequest( 560 FilesListRequest::FilesListRequest(RequestSender* sender,
561 RequestSender* sender, 561 const DriveApiUrlGenerator& url_generator,
562 const DriveApiUrlGenerator& url_generator, 562 const FileListCallback& callback)
563 const FileListCallback& callback)
564 : DriveApiDataRequest<FileList>(sender, callback), 563 : DriveApiDataRequest<FileList>(sender, callback),
565 url_generator_(url_generator), 564 url_generator_(url_generator),
566 max_results_(100) { 565 max_results_(100),
566 corpora_(FilesListCorpora::DEFAULT) {
567 DCHECK(!callback.is_null()); 567 DCHECK(!callback.is_null());
568 } 568 }
569 569
570 FilesListRequest::~FilesListRequest() {} 570 FilesListRequest::~FilesListRequest() {}
571 571
572 GURL FilesListRequest::GetURLInternal() const { 572 GURL FilesListRequest::GetURLInternal() const {
573 return url_generator_.GetFilesListUrl(max_results_, page_token_, q_); 573 return url_generator_.GetFilesListUrl(max_results_, page_token_, corpora_,
574 team_drive_id_, q_);
574 } 575 }
575 576
576 //======================== FilesListNextPageRequest ========================= 577 //======================== FilesListNextPageRequest =========================
577 578
578 FilesListNextPageRequest::FilesListNextPageRequest( 579 FilesListNextPageRequest::FilesListNextPageRequest(
579 RequestSender* sender, 580 RequestSender* sender,
580 const FileListCallback& callback) 581 const FileListCallback& callback)
581 : DriveApiDataRequest<FileList>(sender, callback) { 582 : DriveApiDataRequest<FileList>(sender, callback) {
582 DCHECK(!callback.is_null()); 583 DCHECK(!callback.is_null());
583 } 584 }
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 } else if (last_progress_value_ < child->data_offset + child->data_size && 1446 } else if (last_progress_value_ < child->data_offset + child->data_size &&
1446 child->data_offset + child->data_size < current) { 1447 child->data_offset + child->data_size < current) {
1447 child->request->NotifyUploadProgress(source, child->data_size, 1448 child->request->NotifyUploadProgress(source, child->data_size,
1448 child->data_size); 1449 child->data_size);
1449 } 1450 }
1450 } 1451 }
1451 last_progress_value_ = current; 1452 last_progress_value_ = current;
1452 } 1453 }
1453 } // namespace drive 1454 } // namespace drive
1454 } // namespace google_apis 1455 } // namespace google_apis
OLDNEW
« no previous file with comments | « google_apis/drive/drive_api_requests.h ('k') | google_apis/drive/drive_api_url_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698