| 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/base_requests.h" | 10 #include "chrome/browser/google_apis/base_requests.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 // Adds an observer. | 85 // Adds an observer. |
| 86 virtual void AddObserver(DriveServiceObserver* observer) = 0; | 86 virtual void AddObserver(DriveServiceObserver* observer) = 0; |
| 87 | 87 |
| 88 // Removes an observer. | 88 // Removes an observer. |
| 89 virtual void RemoveObserver(DriveServiceObserver* observer) = 0; | 89 virtual void RemoveObserver(DriveServiceObserver* observer) = 0; |
| 90 | 90 |
| 91 // True if ready to send requests. | 91 // True if ready to send requests. |
| 92 virtual bool CanSendRequest() const = 0; | 92 virtual bool CanSendRequest() const = 0; |
| 93 | 93 |
| 94 // Cancels all in-flight requests. | |
| 95 virtual void CancelAll() = 0; | |
| 96 | |
| 97 // Cancels ongoing request for a given virtual |file_path|. Returns true if | |
| 98 // the request was found and canceled. | |
| 99 virtual bool CancelForFilePath(const base::FilePath& file_path) = 0; | |
| 100 | |
| 101 // Converts the given resource ID into the desired format. | 94 // Converts the given resource ID into the desired format. |
| 102 virtual std::string CanonicalizeResourceId( | 95 virtual std::string CanonicalizeResourceId( |
| 103 const std::string& resource_id) const = 0; | 96 const std::string& resource_id) const = 0; |
| 104 | 97 |
| 105 // Authentication service: | 98 // Authentication service: |
| 106 | 99 |
| 107 // True if OAuth2 access token is retrieved and believed to be fresh. | 100 // True if OAuth2 access token is retrieved and believed to be fresh. |
| 108 virtual bool HasAccessToken() const = 0; | 101 virtual bool HasAccessToken() const = 0; |
| 109 | 102 |
| 110 // True if OAuth2 refresh token is present. | 103 // True if OAuth2 refresh token is present. |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 // the provided app. |callback| must not be null. | 359 // the provided app. |callback| must not be null. |
| 367 virtual CancelCallback AuthorizeApp( | 360 virtual CancelCallback AuthorizeApp( |
| 368 const std::string& resource_id, | 361 const std::string& resource_id, |
| 369 const std::string& app_id, | 362 const std::string& app_id, |
| 370 const AuthorizeAppCallback& callback) = 0; | 363 const AuthorizeAppCallback& callback) = 0; |
| 371 }; | 364 }; |
| 372 | 365 |
| 373 } // namespace google_apis | 366 } // namespace google_apis |
| 374 | 367 |
| 375 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 368 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
| OLD | NEW |