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_OPERATIONS_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 const GDataWapiUrlGenerator url_generator_; | 256 const GDataWapiUrlGenerator url_generator_; |
257 const std::string resource_id_; | 257 const std::string resource_id_; |
258 const std::string new_name_; | 258 const std::string new_name_; |
259 | 259 |
260 DISALLOW_COPY_AND_ASSIGN(RenameResourceOperation); | 260 DISALLOW_COPY_AND_ASSIGN(RenameResourceOperation); |
261 }; | 261 }; |
262 | 262 |
263 //=========================== AuthorizeAppOperation ========================== | 263 //=========================== AuthorizeAppOperation ========================== |
264 | 264 |
265 // This class performs the operation for authorizing an application specified | 265 // This class performs the operation for authorizing an application specified |
266 // by |app_id| to access a document specified by |edit_url| for . | 266 // by |app_id| to access a document specified by |resource_id|. |
267 class AuthorizeAppOperation : public GetDataOperation { | 267 class AuthorizeAppOperation : public GetDataOperation { |
268 public: | 268 public: |
269 // |callback| must not be null. | 269 // |callback| must not be null. |
270 AuthorizeAppOperation( | 270 AuthorizeAppOperation( |
271 OperationRegistry* registry, | 271 OperationRegistry* registry, |
272 net::URLRequestContextGetter* url_request_context_getter, | 272 net::URLRequestContextGetter* url_request_context_getter, |
273 const GDataWapiUrlGenerator& url_generator, | 273 const GDataWapiUrlGenerator& url_generator, |
274 const GetDataCallback& callback, | 274 const AuthorizeAppCallback& callback, |
275 const std::string& resource_id, | 275 const std::string& resource_id, |
276 const std::string& app_id); | 276 const std::string& app_id); |
277 virtual ~AuthorizeAppOperation(); | 277 virtual ~AuthorizeAppOperation(); |
278 | 278 |
279 protected: | 279 protected: |
280 // UrlFetchOperationBase overrides. | 280 // UrlFetchOperationBase overrides. |
281 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; | 281 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; |
282 virtual bool GetContentData(std::string* upload_content_type, | 282 virtual bool GetContentData(std::string* upload_content_type, |
283 std::string* upload_content) OVERRIDE; | 283 std::string* upload_content) OVERRIDE; |
284 virtual std::vector<std::string> GetExtraRequestHeaders() const OVERRIDE; | 284 virtual std::vector<std::string> GetExtraRequestHeaders() const OVERRIDE; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 private: | 502 private: |
503 const UploadRangeCallback callback_; | 503 const UploadRangeCallback callback_; |
504 const int64 content_length_; | 504 const int64 content_length_; |
505 | 505 |
506 DISALLOW_COPY_AND_ASSIGN(GetUploadStatusOperation); | 506 DISALLOW_COPY_AND_ASSIGN(GetUploadStatusOperation); |
507 }; | 507 }; |
508 | 508 |
509 } // namespace google_apis | 509 } // namespace google_apis |
510 | 510 |
511 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ | 511 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_OPERATIONS_H_ |
OLD | NEW |