| 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 10 matching lines...) Expand all Loading... |
| 21 namespace base { | 21 namespace base { |
| 22 class FilePath; | 22 class FilePath; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace net { | 25 namespace net { |
| 26 class URLRequestContextGetter; | 26 class URLRequestContextGetter; |
| 27 } // namespace net | 27 } // namespace net |
| 28 | 28 |
| 29 namespace google_apis { | 29 namespace google_apis { |
| 30 class AuthService; | 30 class AuthService; |
| 31 class OperationRunner; | 31 class RequestSender; |
| 32 | 32 |
| 33 // This class provides documents feed service calls for WAPI (codename for | 33 // This class provides documents feed service calls for WAPI (codename for |
| 34 // DocumentsList API). | 34 // DocumentsList API). |
| 35 // Details of API call are abstracted in each operation class and this class | 35 // Details of API call are abstracted in each operation class and this class |
| 36 // works as a thin wrapper for the API. | 36 // works as a thin wrapper for the API. |
| 37 class GDataWapiService : public DriveServiceInterface, | 37 class GDataWapiService : public DriveServiceInterface, |
| 38 public AuthServiceObserver { | 38 public AuthServiceObserver { |
| 39 public: | 39 public: |
| 40 // |url_request_context_getter| is used to initialize URLFetcher. | 40 // |url_request_context_getter| is used to initialize URLFetcher. |
| 41 // |base_url| is used to generate URLs for communicating with the WAPI | 41 // |base_url| is used to generate URLs for communicating with the WAPI |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 virtual void AuthorizeApp( | 158 virtual void AuthorizeApp( |
| 159 const std::string& resource_id, | 159 const std::string& resource_id, |
| 160 const std::string& app_id, | 160 const std::string& app_id, |
| 161 const AuthorizeAppCallback& callback) OVERRIDE; | 161 const AuthorizeAppCallback& callback) OVERRIDE; |
| 162 | 162 |
| 163 private: | 163 private: |
| 164 // AuthService::Observer override. | 164 // AuthService::Observer override. |
| 165 virtual void OnOAuth2RefreshTokenChanged() OVERRIDE; | 165 virtual void OnOAuth2RefreshTokenChanged() OVERRIDE; |
| 166 | 166 |
| 167 net::URLRequestContextGetter* url_request_context_getter_; // Not owned. | 167 net::URLRequestContextGetter* url_request_context_getter_; // Not owned. |
| 168 scoped_ptr<OperationRunner> runner_; | 168 scoped_ptr<RequestSender> sender_; |
| 169 ObserverList<DriveServiceObserver> observers_; | 169 ObserverList<DriveServiceObserver> observers_; |
| 170 // Operation objects should hold a copy of this, rather than a const | 170 // Operation objects should hold a copy of this, rather than a const |
| 171 // reference, as they may outlive this object. | 171 // reference, as they may outlive this object. |
| 172 const GDataWapiUrlGenerator url_generator_; | 172 const GDataWapiUrlGenerator url_generator_; |
| 173 const std::string custom_user_agent_; | 173 const std::string custom_user_agent_; |
| 174 | 174 |
| 175 DISALLOW_COPY_AND_ASSIGN(GDataWapiService); | 175 DISALLOW_COPY_AND_ASSIGN(GDataWapiService); |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 } // namespace google_apis | 178 } // namespace google_apis |
| 179 | 179 |
| 180 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_SERVICE_H_ | 180 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_SERVICE_H_ |
| OLD | NEW |