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 "components/drive/service/drive_api_service.h" | 5 #include "components/drive/service/drive_api_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 const char kFileResourceShareLinkFields[] = | 110 const char kFileResourceShareLinkFields[] = |
111 "kind,id,shareLink"; | 111 "kind,id,shareLink"; |
112 const char kFileListFields[] = | 112 const char kFileListFields[] = |
113 "kind,items(kind,id,title,createdDate,sharedWithMeDate," | 113 "kind,items(kind,id,title,createdDate,sharedWithMeDate," |
114 "mimeType,md5Checksum,fileSize,labels/trashed,labels/starred," | 114 "mimeType,md5Checksum,fileSize,labels/trashed,labels/starred," |
115 "imageMediaMetadata/width," | 115 "imageMediaMetadata/width," |
116 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag," | 116 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag," |
117 "parents(id,parentLink),alternateLink," | 117 "parents(id,parentLink),alternateLink," |
118 "modifiedDate,lastViewedByMeDate,shared),nextLink"; | 118 "modifiedDate,lastViewedByMeDate,shared),nextLink"; |
119 const char kChangeListFields[] = | 119 const char kChangeListFields[] = |
120 "kind,items(file(kind,id,title,createdDate,sharedWithMeDate," | 120 "kind,items(type,file(kind,id,title,createdDate,sharedWithMeDate," |
121 "mimeType,md5Checksum,fileSize,labels/trashed,labels/starred," | 121 "mimeType,md5Checksum,fileSize,labels/trashed,labels/starred," |
122 "imageMediaMetadata/width," | 122 "imageMediaMetadata/width," |
123 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag," | 123 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag," |
124 "parents(id,parentLink),alternateLink,modifiedDate," | 124 "parents(id,parentLink),alternateLink,modifiedDate," |
125 "lastViewedByMeDate,shared),deleted,id,fileId,modificationDate),nextLink," | 125 "lastViewedByMeDate,shared),teamDrive(kind,id,name,capabilities)," |
| 126 "teamDriveId," |
| 127 "deleted,id,fileId,modificationDate),nextLink," |
126 "largestChangeId"; | 128 "largestChangeId"; |
127 | 129 |
128 void ExtractOpenUrlAndRun(const std::string& app_id, | 130 void ExtractOpenUrlAndRun(const std::string& app_id, |
129 const AuthorizeAppCallback& callback, | 131 const AuthorizeAppCallback& callback, |
130 DriveApiErrorCode error, | 132 DriveApiErrorCode error, |
131 std::unique_ptr<FileResource> value) { | 133 std::unique_ptr<FileResource> value) { |
132 DCHECK(!callback.is_null()); | 134 DCHECK(!callback.is_null()); |
133 | 135 |
134 if (!value) { | 136 if (!value) { |
135 callback.Run(error, GURL()); | 137 callback.Run(error, GURL()); |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 // RequestSender before the request is committed because the request has a | 879 // RequestSender before the request is committed because the request has a |
878 // reference to RequestSender and we should ensure to delete the request when | 880 // reference to RequestSender and we should ensure to delete the request when |
879 // the sender is deleted. Resolve the circulating dependency and fix it. | 881 // the sender is deleted. Resolve the circulating dependency and fix it. |
880 const google_apis::CancelCallback callback = | 882 const google_apis::CancelCallback callback = |
881 sender_->StartRequestWithAuthRetry(std::move(request)); | 883 sender_->StartRequestWithAuthRetry(std::move(request)); |
882 return base::MakeUnique<BatchRequestConfigurator>( | 884 return base::MakeUnique<BatchRequestConfigurator>( |
883 weak_ref, sender_->blocking_task_runner(), url_generator_, callback); | 885 weak_ref, sender_->blocking_task_runner(), url_generator_, callback); |
884 } | 886 } |
885 | 887 |
886 } // namespace drive | 888 } // namespace drive |
OLD | NEW |