| 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_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chrome/browser/chromeos/gdata/documents_service_interface.h" | 12 #include "chrome/browser/chromeos/gdata/drive_service_interface.h" |
| 13 #include "chrome/browser/chromeos/gdata/gdata_operations.h" | 13 #include "chrome/browser/chromeos/gdata/gdata_operations.h" |
| 14 #include "chrome/browser/chromeos/gdata/gdata_auth_service.h" | 14 #include "chrome/browser/chromeos/gdata/gdata_auth_service.h" |
| 15 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" | 15 #include "chrome/browser/chromeos/gdata/gdata_errorcode.h" |
| 16 | 16 |
| 17 class FilePath; | 17 class FilePath; |
| 18 class GURL; | 18 class GURL; |
| 19 class Profile; | 19 class Profile; |
| 20 | 20 |
| 21 namespace gdata { | 21 namespace gdata { |
| 22 | 22 |
| 23 class GDataOperationRunner; | 23 class GDataOperationRunner; |
| 24 | 24 |
| 25 // This class provides documents feed service calls for WAPI (codename for | 25 // This class provides documents feed service calls for WAPI (codename for |
| 26 // DocumentsList API). | 26 // DocumentsList API). |
| 27 // Details of API call are abstracted in each operation class and this class | 27 // Details of API call are abstracted in each operation class and this class |
| 28 // works as a thin wrapper for the API. | 28 // works as a thin wrapper for the API. |
| 29 class GDataWapiService : public DocumentsServiceInterface { | 29 class GDataWapiService : public DriveServiceInterface { |
| 30 public: | 30 public: |
| 31 // Instance is usually created by GDataSystemServiceFactory and owned by | 31 // Instance is usually created by GDataSystemServiceFactory and owned by |
| 32 // GDataFileSystem. | 32 // GDataFileSystem. |
| 33 GDataWapiService(); | 33 GDataWapiService(); |
| 34 virtual ~GDataWapiService(); | 34 virtual ~GDataWapiService(); |
| 35 | 35 |
| 36 GDataAuthService* auth_service_for_testing(); | 36 GDataAuthService* auth_service_for_testing(); |
| 37 | 37 |
| 38 // DocumentsServiceInterface Overrides | 38 // DriveServiceInterface Overrides |
| 39 virtual void Initialize(Profile* profile) OVERRIDE; | 39 virtual void Initialize(Profile* profile) OVERRIDE; |
| 40 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; | 40 virtual GDataOperationRegistry* operation_registry() const OVERRIDE; |
| 41 virtual void CancelAll() OVERRIDE; | 41 virtual void CancelAll() OVERRIDE; |
| 42 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; | 42 virtual void Authenticate(const AuthStatusCallback& callback) OVERRIDE; |
| 43 virtual bool HasAccessToken() const OVERRIDE; | 43 virtual bool HasAccessToken() const OVERRIDE; |
| 44 virtual bool HasRefreshToken() const OVERRIDE; | 44 virtual bool HasRefreshToken() const OVERRIDE; |
| 45 virtual void GetDocuments(const GURL& feed_url, | 45 virtual void GetDocuments(const GURL& feed_url, |
| 46 int64 start_changestamp, | 46 int64 start_changestamp, |
| 47 const std::string& search_query, | 47 const std::string& search_query, |
| 48 const std::string& directory_resource_id, | 48 const std::string& directory_resource_id, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 Profile* profile_; | 96 Profile* profile_; |
| 97 | 97 |
| 98 scoped_ptr<GDataOperationRunner> runner_; | 98 scoped_ptr<GDataOperationRunner> runner_; |
| 99 | 99 |
| 100 DISALLOW_COPY_AND_ASSIGN(GDataWapiService); | 100 DISALLOW_COPY_AND_ASSIGN(GDataWapiService); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace gdata | 103 } // namespace gdata |
| 104 | 104 |
| 105 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ | 105 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_SERVICE_H_ |
| OLD | NEW |