| 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 GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ | 5 #ifndef GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ |
| 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ | 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 protected: | 497 protected: |
| 498 // Overridden from DriveApiDataRequest. | 498 // Overridden from DriveApiDataRequest. |
| 499 virtual GURL GetURLInternal() const OVERRIDE; | 499 virtual GURL GetURLInternal() const OVERRIDE; |
| 500 | 500 |
| 501 private: | 501 private: |
| 502 const DriveApiUrlGenerator url_generator_; | 502 const DriveApiUrlGenerator url_generator_; |
| 503 | 503 |
| 504 DISALLOW_COPY_AND_ASSIGN(AppsListRequest); | 504 DISALLOW_COPY_AND_ASSIGN(AppsListRequest); |
| 505 }; | 505 }; |
| 506 | 506 |
| 507 //============================= AppsDeleteRequest ============================== |
| 508 |
| 509 // This class performs the request for deleting a Drive app. |
| 510 // This request is mapped to |
| 511 // https://developers.google.com/drive/v2/reference/files/trash |
| 512 class AppsDeleteRequest : public EntryActionRequest { |
| 513 public: |
| 514 AppsDeleteRequest(RequestSender* sender, |
| 515 const DriveApiUrlGenerator& url_generator, |
| 516 const EntryActionCallback& callback); |
| 517 virtual ~AppsDeleteRequest(); |
| 518 |
| 519 // Required parameter. |
| 520 const std::string& app_id() const { return app_id_; } |
| 521 void set_app_id(const std::string& app_id) { app_id_ = app_id; } |
| 522 |
| 523 protected: |
| 524 // Overridden from UrlFetchRequestBase. |
| 525 virtual net::URLFetcher::RequestType GetRequestType() const OVERRIDE; |
| 526 virtual GURL GetURL() const OVERRIDE; |
| 527 |
| 528 private: |
| 529 const DriveApiUrlGenerator url_generator_; |
| 530 std::string app_id_; |
| 531 |
| 532 DISALLOW_COPY_AND_ASSIGN(AppsDeleteRequest); |
| 533 }; |
| 534 |
| 507 //========================== ChildrenInsertRequest ============================ | 535 //========================== ChildrenInsertRequest ============================ |
| 508 | 536 |
| 509 // This class performs the request for inserting a resource to a directory. | 537 // This class performs the request for inserting a resource to a directory. |
| 510 // This request is mapped to | 538 // This request is mapped to |
| 511 // https://developers.google.com/drive/v2/reference/children/insert | 539 // https://developers.google.com/drive/v2/reference/children/insert |
| 512 class ChildrenInsertRequest : public EntryActionRequest { | 540 class ChildrenInsertRequest : public EntryActionRequest { |
| 513 public: | 541 public: |
| 514 ChildrenInsertRequest(RequestSender* sender, | 542 ChildrenInsertRequest(RequestSender* sender, |
| 515 const DriveApiUrlGenerator& url_generator, | 543 const DriveApiUrlGenerator& url_generator, |
| 516 const EntryActionCallback& callback); | 544 const EntryActionCallback& callback); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 const ProgressCallback& progress_callback); | 752 const ProgressCallback& progress_callback); |
| 725 virtual ~DownloadFileRequest(); | 753 virtual ~DownloadFileRequest(); |
| 726 | 754 |
| 727 DISALLOW_COPY_AND_ASSIGN(DownloadFileRequest); | 755 DISALLOW_COPY_AND_ASSIGN(DownloadFileRequest); |
| 728 }; | 756 }; |
| 729 | 757 |
| 730 } // namespace drive | 758 } // namespace drive |
| 731 } // namespace google_apis | 759 } // namespace google_apis |
| 732 | 760 |
| 733 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ | 761 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_REQUESTS_H_ |
| OLD | NEW |