OLD | NEW |
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 Loading... |
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 scope_(FilesListScope::kDefault) { |
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_, scope_, q_); |
574 } | 574 } |
575 | 575 |
576 //======================== FilesListNextPageRequest ========================= | 576 //======================== FilesListNextPageRequest ========================= |
577 | 577 |
578 FilesListNextPageRequest::FilesListNextPageRequest( | 578 FilesListNextPageRequest::FilesListNextPageRequest( |
579 RequestSender* sender, | 579 RequestSender* sender, |
580 const FileListCallback& callback) | 580 const FileListCallback& callback) |
581 : DriveApiDataRequest<FileList>(sender, callback) { | 581 : DriveApiDataRequest<FileList>(sender, callback) { |
582 DCHECK(!callback.is_null()); | 582 DCHECK(!callback.is_null()); |
583 } | 583 } |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 } else if (last_progress_value_ < child->data_offset + child->data_size && | 1445 } else if (last_progress_value_ < child->data_offset + child->data_size && |
1446 child->data_offset + child->data_size < current) { | 1446 child->data_offset + child->data_size < current) { |
1447 child->request->NotifyUploadProgress(source, child->data_size, | 1447 child->request->NotifyUploadProgress(source, child->data_size, |
1448 child->data_size); | 1448 child->data_size); |
1449 } | 1449 } |
1450 } | 1450 } |
1451 last_progress_value_ = current; | 1451 last_progress_value_ = current; |
1452 } | 1452 } |
1453 } // namespace drive | 1453 } // namespace drive |
1454 } // namespace google_apis | 1454 } // namespace google_apis |
OLD | NEW |