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_GOOGLE_APIS_GDATA_WAPI_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_SERVICE_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_SERVICE_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // This class provides documents feed service calls for WAPI (codename for | 26 // This class provides documents feed service calls for WAPI (codename for |
27 // DocumentsList API). | 27 // DocumentsList API). |
28 // Details of API call are abstracted in each operation class and this class | 28 // Details of API call are abstracted in each operation class and this class |
29 // works as a thin wrapper for the API. | 29 // works as a thin wrapper for the API. |
30 class GDataWapiService : public DriveServiceInterface, | 30 class GDataWapiService : public DriveServiceInterface, |
31 public AuthServiceObserver, | 31 public AuthServiceObserver, |
32 public OperationRegistryObserver { | 32 public OperationRegistryObserver { |
33 public: | 33 public: |
34 // Instance is usually created by DriveSystemServiceFactory and owned by | 34 // Instance is usually created by DriveSystemServiceFactory and owned by |
35 // DriveFileSystem. | 35 // DriveFileSystem. |
36 GDataWapiService(); | 36 // |
| 37 // |base_url| is used to generate URLs for communicating with the WAPI |
| 38 // |server. See gdata_wapi_url_generator.h for details. |
| 39 explicit GDataWapiService(const GURL& base_url); |
37 virtual ~GDataWapiService(); | 40 virtual ~GDataWapiService(); |
38 | 41 |
39 AuthService* auth_service_for_testing(); | 42 AuthService* auth_service_for_testing(); |
40 | 43 |
41 // DriveServiceInterface Overrides | 44 // DriveServiceInterface Overrides |
42 virtual void Initialize(Profile* profile) OVERRIDE; | 45 virtual void Initialize(Profile* profile) OVERRIDE; |
43 virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE; | 46 virtual void AddObserver(DriveServiceObserver* observer) OVERRIDE; |
44 virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE; | 47 virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE; |
45 virtual bool CanStartOperation() const OVERRIDE; | 48 virtual bool CanStartOperation() const OVERRIDE; |
46 virtual void CancelAll() OVERRIDE; | 49 virtual void CancelAll() OVERRIDE; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // Operation objects should hold a copy of this, rather than a const | 125 // Operation objects should hold a copy of this, rather than a const |
123 // reference, as they may outlive this object. | 126 // reference, as they may outlive this object. |
124 GDataWapiUrlGenerator url_generator_; | 127 GDataWapiUrlGenerator url_generator_; |
125 | 128 |
126 DISALLOW_COPY_AND_ASSIGN(GDataWapiService); | 129 DISALLOW_COPY_AND_ASSIGN(GDataWapiService); |
127 }; | 130 }; |
128 | 131 |
129 } // namespace google_apis | 132 } // namespace google_apis |
130 | 133 |
131 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_SERVICE_H_ | 134 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_SERVICE_H_ |
OLD | NEW |