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

Side by Side Diff: chrome/browser/drive/drive_api_service.cc

Issue 306073007: [Drive] Fetch id field of the parents in FileResource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "chrome/browser/drive/drive_api_service.h" 5 #include "chrome/browser/drive/drive_api_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const int kMaxNumFilesResourcePerRequest = 300; 99 const int kMaxNumFilesResourcePerRequest = 300;
100 const int kMaxNumFilesResourcePerRequestForSearch = 100; 100 const int kMaxNumFilesResourcePerRequestForSearch = 100;
101 101
102 // For performance, we declare all fields we use. 102 // For performance, we declare all fields we use.
103 const char kAboutResourceFields[] = 103 const char kAboutResourceFields[] =
104 "kind,quotaBytesTotal,quotaBytesUsed,largestChangeId,rootFolderId"; 104 "kind,quotaBytesTotal,quotaBytesUsed,largestChangeId,rootFolderId";
105 const char kFileResourceFields[] = 105 const char kFileResourceFields[] =
106 "kind,id,title,createdDate,sharedWithMeDate,mimeType," 106 "kind,id,title,createdDate,sharedWithMeDate,mimeType,"
107 "md5Checksum,fileSize,labels/trashed,imageMediaMetadata/width," 107 "md5Checksum,fileSize,labels/trashed,imageMediaMetadata/width,"
108 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag," 108 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag,"
109 "parents/parentLink,alternateLink," 109 "parents/(id,parentLink),alternateLink,"
110 "modifiedDate,lastViewedByMeDate,shared"; 110 "modifiedDate,lastViewedByMeDate,shared";
111 const char kFileResourceOpenWithLinksFields[] = 111 const char kFileResourceOpenWithLinksFields[] =
112 "kind,id,openWithLinks/*"; 112 "kind,id,openWithLinks/*";
113 const char kFileListFields[] = 113 const char kFileListFields[] =
114 "kind,items(kind,id,title,createdDate,sharedWithMeDate," 114 "kind,items(kind,id,title,createdDate,sharedWithMeDate,"
115 "mimeType,md5Checksum,fileSize,labels/trashed,imageMediaMetadata/width," 115 "mimeType,md5Checksum,fileSize,labels/trashed,imageMediaMetadata/width,"
116 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag," 116 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag,"
117 "parents/parentLink,alternateLink," 117 "parents/parentLink,alternateLink,"
hashimoto 2014/06/02 08:09:53 Please add "id" here too.
tzik 2014/06/02 08:13:01 Done.
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(file(kind,id,title,createdDate,sharedWithMeDate,"
121 "mimeType,md5Checksum,fileSize,labels/trashed,imageMediaMetadata/width," 121 "mimeType,md5Checksum,fileSize,labels/trashed,imageMediaMetadata/width,"
122 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag," 122 "imageMediaMetadata/height,imageMediaMetadata/rotation,etag,"
123 "parents/parentLink,alternateLink,modifiedDate,lastViewedByMeDate,shared)," 123 "parents/parentLink,alternateLink,modifiedDate,lastViewedByMeDate,shared),"
hashimoto 2014/06/02 08:09:53 ditto.
tzik 2014/06/02 08:13:01 Done.
124 "deleted,id,fileId,modificationDate),nextLink,largestChangeId"; 124 "deleted,id,fileId,modificationDate),nextLink,largestChangeId";
125 125
126 // Callback invoked when the parsing of resource list is completed, 126 // Callback invoked when the parsing of resource list is completed,
127 // regardless whether it is succeeded or not. 127 // regardless whether it is succeeded or not.
128 void DidConvertToResourceListOnBlockingPool( 128 void DidConvertToResourceListOnBlockingPool(
129 const GetResourceListCallback& callback, 129 const GetResourceListCallback& callback,
130 scoped_ptr<ResourceList> resource_list) { 130 scoped_ptr<ResourceList> resource_list) {
131 GDataErrorCode error = resource_list ? HTTP_SUCCESS : GDATA_PARSE_ERROR; 131 GDataErrorCode error = resource_list ? HTTP_SUCCESS : GDATA_PARSE_ERROR;
132 callback.Run(error, resource_list.Pass()); 132 callback.Run(error, resource_list.Pass());
133 } 133 }
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 if (CanSendRequest()) { 858 if (CanSendRequest()) {
859 FOR_EACH_OBSERVER( 859 FOR_EACH_OBSERVER(
860 DriveServiceObserver, observers_, OnReadyToSendRequests()); 860 DriveServiceObserver, observers_, OnReadyToSendRequests());
861 } else if (!HasRefreshToken()) { 861 } else if (!HasRefreshToken()) {
862 FOR_EACH_OBSERVER( 862 FOR_EACH_OBSERVER(
863 DriveServiceObserver, observers_, OnRefreshTokenInvalid()); 863 DriveServiceObserver, observers_, OnRefreshTokenInvalid());
864 } 864 }
865 } 865 }
866 866
867 } // namespace drive 867 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698