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

Side by Side Diff: chrome/browser/drive/drive_service_interface.h

Issue 305913002: drive: Replace GetResourceListCallback in DriveServiceInterface with FileListCallback (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 | « chrome/browser/drive/drive_api_service.cc ('k') | chrome/browser/drive/dummy_drive_service.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 #ifndef CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual void ClearAccessToken() = 0; 134 virtual void ClearAccessToken() = 0;
135 135
136 // Clears OAuth2 refresh token. 136 // Clears OAuth2 refresh token.
137 virtual void ClearRefreshToken() = 0; 137 virtual void ClearRefreshToken() = 0;
138 138
139 // Document access: 139 // Document access:
140 140
141 // Returns the resource id for the root directory. 141 // Returns the resource id for the root directory.
142 virtual std::string GetRootResourceId() const = 0; 142 virtual std::string GetRootResourceId() const = 0;
143 143
144 // Fetches a resource list of the account. |callback| will be called upon 144 // Fetches a file list of the account. |callback| will be called upon
145 // completion. 145 // completion.
146 // If the list is too long, it may be paged. In such a case, a URL to fetch 146 // If the list is too long, it may be paged. In such a case, a URL to fetch
147 // remaining results will be included in the returned result. See also 147 // remaining results will be included in the returned result. See also
148 // GetRemainingFileList. 148 // GetRemainingFileList.
149 // 149 //
150 // |callback| must not be null. 150 // |callback| must not be null.
151 virtual google_apis::CancelCallback GetAllResourceList( 151 virtual google_apis::CancelCallback GetAllFileList(
152 const google_apis::GetResourceListCallback& callback) = 0; 152 const google_apis::FileListCallback& callback) = 0;
153 153
154 // Fetches a resource list in the directory with |directory_resource_id|. 154 // Fetches a file list in the directory with |directory_resource_id|.
155 // |callback| will be called upon completion. 155 // |callback| will be called upon completion.
156 // If the list is too long, it may be paged. In such a case, a URL to fetch 156 // If the list is too long, it may be paged. In such a case, a URL to fetch
157 // remaining results will be included in the returned result. See also 157 // remaining results will be included in the returned result. See also
158 // GetRemainingFileList. 158 // GetRemainingFileList.
159 // 159 //
160 // |directory_resource_id| must not be empty. 160 // |directory_resource_id| must not be empty.
161 // |callback| must not be null. 161 // |callback| must not be null.
162 virtual google_apis::CancelCallback GetResourceListInDirectory( 162 virtual google_apis::CancelCallback GetFileListInDirectory(
163 const std::string& directory_resource_id, 163 const std::string& directory_resource_id,
164 const google_apis::GetResourceListCallback& callback) = 0; 164 const google_apis::FileListCallback& callback) = 0;
165 165
166 // Searches the resources for the |search_query| from all the user's 166 // Searches the resources for the |search_query| from all the user's
167 // resources. |callback| will be called upon completion. 167 // resources. |callback| will be called upon completion.
168 // If the list is too long, it may be paged. In such a case, a URL to fetch 168 // If the list is too long, it may be paged. In such a case, a URL to fetch
169 // remaining results will be included in the returned result. See also 169 // remaining results will be included in the returned result. See also
170 // GetRemainingFileList. 170 // GetRemainingFileList.
171 // 171 //
172 // |search_query| must not be empty. 172 // |search_query| must not be empty.
173 // |callback| must not be null. 173 // |callback| must not be null.
174 virtual google_apis::CancelCallback Search( 174 virtual google_apis::CancelCallback Search(
175 const std::string& search_query, 175 const std::string& search_query,
176 const google_apis::GetResourceListCallback& callback) = 0; 176 const google_apis::FileListCallback& callback) = 0;
177 177
178 // Searches the resources with the |title|. 178 // Searches the resources with the |title|.
179 // |directory_resource_id| is an optional parameter. If it is empty, 179 // |directory_resource_id| is an optional parameter. If it is empty,
180 // the search target is all the existing resources. Otherwise, it is 180 // the search target is all the existing resources. Otherwise, it is
181 // the resources directly under the directory with |directory_resource_id|. 181 // the resources directly under the directory with |directory_resource_id|.
182 // If the list is too long, it may be paged. In such a case, a URL to fetch 182 // If the list is too long, it may be paged. In such a case, a URL to fetch
183 // remaining results will be included in the returned result. See also 183 // remaining results will be included in the returned result. See also
184 // GetRemainingFileList. 184 // GetRemainingFileList.
185 // 185 //
186 // |title| must not be empty, and |callback| must not be null. 186 // |title| must not be empty, and |callback| must not be null.
187 virtual google_apis::CancelCallback SearchByTitle( 187 virtual google_apis::CancelCallback SearchByTitle(
188 const std::string& title, 188 const std::string& title,
189 const std::string& directory_resource_id, 189 const std::string& directory_resource_id,
190 const google_apis::GetResourceListCallback& callback) = 0; 190 const google_apis::FileListCallback& callback) = 0;
191 191
192 // Fetches change list since |start_changestamp|. |callback| will be 192 // Fetches change list since |start_changestamp|. |callback| will be
193 // called upon completion. 193 // called upon completion.
194 // If the list is too long, it may be paged. In such a case, a URL to fetch 194 // If the list is too long, it may be paged. In such a case, a URL to fetch
195 // remaining results will be included in the returned result. See also 195 // remaining results will be included in the returned result. See also
196 // GetRemainingChangeList. 196 // GetRemainingChangeList.
197 // 197 //
198 // |callback| must not be null. 198 // |callback| must not be null.
199 virtual google_apis::CancelCallback GetChangeList( 199 virtual google_apis::CancelCallback GetChangeList(
200 int64 start_changestamp, 200 int64 start_changestamp,
201 const google_apis::ChangeListCallback& callback) = 0; 201 const google_apis::ChangeListCallback& callback) = 0;
202 202
203 // The result of GetChangeList() may be paged. 203 // The result of GetChangeList() may be paged.
204 // In such a case, a next link to fetch remaining result is returned. 204 // In such a case, a next link to fetch remaining result is returned.
205 // The page token can be used for this method. |callback| will be called upon 205 // The page token can be used for this method. |callback| will be called upon
206 // completion. 206 // completion.
207 // 207 //
208 // |next_link| must not be empty. |callback| must not be null. 208 // |next_link| must not be empty. |callback| must not be null.
209 virtual google_apis::CancelCallback GetRemainingChangeList( 209 virtual google_apis::CancelCallback GetRemainingChangeList(
210 const GURL& next_link, 210 const GURL& next_link,
211 const google_apis::ChangeListCallback& callback) = 0; 211 const google_apis::ChangeListCallback& callback) = 0;
212 212
213 // The result of GetAllResourceList(), GetResourceListInDirectory(), Search() 213 // The result of GetAllFileList(), GetFileListInDirectory(), Search()
214 // and SearchByTitle() may be paged. In such a case, a next link to fetch 214 // and SearchByTitle() may be paged. In such a case, a next link to fetch
215 // remaining result is returned. The page token can be used for this method. 215 // remaining result is returned. The page token can be used for this method.
216 // |callback| will be called upon completion. 216 // |callback| will be called upon completion.
217 // 217 //
218 // |next_link| must not be empty. |callback| must not be null. 218 // |next_link| must not be empty. |callback| must not be null.
219 virtual google_apis::CancelCallback GetRemainingFileList( 219 virtual google_apis::CancelCallback GetRemainingFileList(
220 const GURL& next_link, 220 const GURL& next_link,
221 const google_apis::GetResourceListCallback& callback) = 0; 221 const google_apis::FileListCallback& callback) = 0;
222 222
223 // Fetches single entry metadata from server. The entry's resource id equals 223 // Fetches single entry metadata from server. The entry's resource id equals
224 // |resource_id|. 224 // |resource_id|.
225 // Upon completion, invokes |callback| with results on the calling thread. 225 // Upon completion, invokes |callback| with results on the calling thread.
226 // |callback| must not be null. 226 // |callback| must not be null.
227 virtual google_apis::CancelCallback GetResourceEntry( 227 virtual google_apis::CancelCallback GetResourceEntry(
228 const std::string& resource_id, 228 const std::string& resource_id,
229 const google_apis::GetResourceEntryCallback& callback) = 0; 229 const google_apis::GetResourceEntryCallback& callback) = 0;
230 230
231 // Fetches an url for the sharing dialog for a single entry with id 231 // Fetches an url for the sharing dialog for a single entry with id
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 virtual google_apis::CancelCallback AddPermission( 420 virtual google_apis::CancelCallback AddPermission(
421 const std::string& resource_id, 421 const std::string& resource_id,
422 const std::string& email, 422 const std::string& email,
423 google_apis::drive::PermissionRole role, 423 google_apis::drive::PermissionRole role,
424 const google_apis::EntryActionCallback& callback) = 0; 424 const google_apis::EntryActionCallback& callback) = 0;
425 }; 425 };
426 426
427 } // namespace drive 427 } // namespace drive
428 428
429 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ 429 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_
OLDNEW
« no previous file with comments | « chrome/browser/drive/drive_api_service.cc ('k') | chrome/browser/drive/dummy_drive_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698