| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_URL_GENERATOR_H_ | 5 #ifndef GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ |
| 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ | 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 12 #include "base/macros.h" |
| 10 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 11 | 14 |
| 12 namespace google_apis { | 15 namespace google_apis { |
| 13 | 16 |
| 14 // This class is used to generate URLs for communicating with drive api | 17 // This class is used to generate URLs for communicating with drive api |
| 15 // servers for production, and a local server for testing. | 18 // servers for production, and a local server for testing. |
| 16 class DriveApiUrlGenerator { | 19 class DriveApiUrlGenerator { |
| 17 public: | 20 public: |
| 18 // |base_url| is the path to the target drive api server. | 21 // |base_url| is the path to the target drive api server. |
| 19 // Note that this is an injecting point for a testing server. | 22 // Note that this is an injecting point for a testing server. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Returns a URL to delete a resource with the given |file_id|. | 74 // Returns a URL to delete a resource with the given |file_id|. |
| 72 GURL GetFilesDeleteUrl(const std::string& file_id) const; | 75 GURL GetFilesDeleteUrl(const std::string& file_id) const; |
| 73 | 76 |
| 74 // Returns a URL to trash a resource with the given |file_id|. | 77 // Returns a URL to trash a resource with the given |file_id|. |
| 75 GURL GetFilesTrashUrl(const std::string& file_id) const; | 78 GURL GetFilesTrashUrl(const std::string& file_id) const; |
| 76 | 79 |
| 77 // Returns a URL to fetch a list of changes. | 80 // Returns a URL to fetch a list of changes. |
| 78 GURL GetChangesListUrl(bool include_deleted, | 81 GURL GetChangesListUrl(bool include_deleted, |
| 79 int max_results, | 82 int max_results, |
| 80 const std::string& page_token, | 83 const std::string& page_token, |
| 81 int64 start_change_id) const; | 84 int64_t start_change_id) const; |
| 82 | 85 |
| 83 // Returns a URL to add a resource to a directory with |folder_id|. | 86 // Returns a URL to add a resource to a directory with |folder_id|. |
| 84 GURL GetChildrenInsertUrl(const std::string& folder_id) const; | 87 GURL GetChildrenInsertUrl(const std::string& folder_id) const; |
| 85 | 88 |
| 86 // Returns a URL to remove a resource with |child_id| from a directory | 89 // Returns a URL to remove a resource with |child_id| from a directory |
| 87 // with |folder_id|. | 90 // with |folder_id|. |
| 88 GURL GetChildrenDeleteUrl(const std::string& child_id, | 91 GURL GetChildrenDeleteUrl(const std::string& child_id, |
| 89 const std::string& folder_id) const; | 92 const std::string& folder_id) const; |
| 90 | 93 |
| 91 // Returns a URL to initiate "resumable upload" of a new file that uploads | 94 // Returns a URL to initiate "resumable upload" of a new file that uploads |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 const GURL base_url_; | 130 const GURL base_url_; |
| 128 const GURL base_download_url_; | 131 const GURL base_download_url_; |
| 129 const GURL base_thumbnail_url_; | 132 const GURL base_thumbnail_url_; |
| 130 | 133 |
| 131 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here. | 134 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here. |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 } // namespace google_apis | 137 } // namespace google_apis |
| 135 | 138 |
| 136 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ | 139 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ |
| OLD | NEW |