| 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 #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 "chrome/browser/google_apis/auth_service_interface.h" | 10 #include "chrome/browser/google_apis/auth_service_interface.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 int64 content_length, | 357 int64 content_length, |
| 358 const google_apis::UploadRangeCallback& callback) = 0; | 358 const google_apis::UploadRangeCallback& callback) = 0; |
| 359 | 359 |
| 360 // Authorizes a Drive app with the id |app_id| to open the given file. | 360 // Authorizes a Drive app with the id |app_id| to open the given file. |
| 361 // Upon completion, invokes |callback| with the link to open the file with | 361 // Upon completion, invokes |callback| with the link to open the file with |
| 362 // the provided app. |callback| must not be null. | 362 // the provided app. |callback| must not be null. |
| 363 virtual google_apis::CancelCallback AuthorizeApp( | 363 virtual google_apis::CancelCallback AuthorizeApp( |
| 364 const std::string& resource_id, | 364 const std::string& resource_id, |
| 365 const std::string& app_id, | 365 const std::string& app_id, |
| 366 const google_apis::AuthorizeAppCallback& callback) = 0; | 366 const google_apis::AuthorizeAppCallback& callback) = 0; |
| 367 |
| 368 // This is introduced as a temporary short term solution of the performance |
| 369 // regression issue on Drive API v2. |
| 370 // |
| 371 // This fetches the resource list in a directory by usinig GData WAPI |
| 372 // regardless of base protocol. In other words, even if we enabels Drive API |
| 373 // v2, this method uses GData WAPI to fetch the resource list. |
| 374 // |
| 375 // |directory_resource_id| must not be empty. |
| 376 // |callback| must not be null. |
| 377 virtual google_apis::CancelCallback GetResourceListInDirectoryByWapi( |
| 378 const std::string& directory_resource_id, |
| 379 const google_apis::GetResourceListCallback& callback) = 0; |
| 380 |
| 381 // GetResourceListInDirectoryByWapi can be paged. This method fetches the |
| 382 // following pages. |
| 383 // |
| 384 // |callback| must not be null. |
| 385 virtual google_apis::CancelCallback GetRemainingResourceList( |
| 386 const GURL& next_url, |
| 387 const google_apis::GetResourceListCallback& callback) = 0; |
| 367 }; | 388 }; |
| 368 | 389 |
| 369 } // namespace drive | 390 } // namespace drive |
| 370 | 391 |
| 371 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 392 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
| OLD | NEW |