| 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 // URL utility functions for Google Documents List API (aka WAPI). | 5 // URL utility functions for Google Documents List API (aka WAPI). |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_URL_GENERATOR_H_ | 7 #ifndef CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_URL_GENERATOR_H_ |
| 8 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_URL_GENERATOR_H_ | 8 #define CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_URL_GENERATOR_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Adds additional parameters for initiate uploading as well as standard | 30 // Adds additional parameters for initiate uploading as well as standard |
| 31 // url params (as AddStandardUrlParams above does). | 31 // url params (as AddStandardUrlParams above does). |
| 32 static GURL AddInitiateUploadUrlParams(const GURL& url); | 32 static GURL AddInitiateUploadUrlParams(const GURL& url); |
| 33 | 33 |
| 34 // Adds additional parameters for API version, output content type and to | 34 // Adds additional parameters for API version, output content type and to |
| 35 // show folders in the feed are added to document feed URLs. | 35 // show folders in the feed are added to document feed URLs. |
| 36 // Optionally, adds start-index=... parameter if |changestamp| is non-zero, | 36 // Optionally, adds start-index=... parameter if |changestamp| is non-zero, |
| 37 // and adds q=... parameter if |search_string| is non-empty. | 37 // and adds q=... parameter if |search_string| is non-empty. |
| 38 static GURL AddFeedUrlParams(const GURL& url, | 38 static GURL AddFeedUrlParams(const GURL& url, |
| 39 int num_items_to_fetch, | 39 int num_items_to_fetch, |
| 40 int changestamp, | 40 int64 changestamp, |
| 41 const std::string& search_string); | 41 const std::string& search_string); |
| 42 | 42 |
| 43 // Generates a URL for getting the resource list feed. | 43 // Generates a URL for getting the resource list feed. |
| 44 // | 44 // |
| 45 // The parameters other than |search_string| are mutually exclusive. | 45 // The parameters other than |search_string| are mutually exclusive. |
| 46 // If |override_url| is non-empty, other parameters are ignored. Or if | 46 // If |override_url| is non-empty, other parameters are ignored. Or if |
| 47 // |override_url| is empty, others are not used. Besides, |search_string| | 47 // |override_url| is empty, others are not used. Besides, |search_string| |
| 48 // cannot be set together with |start_changestamp|. | 48 // cannot be set together with |start_changestamp|. |
| 49 // | 49 // |
| 50 // TODO(kinaba,haruki): http://crbug.com/160932 | 50 // TODO(kinaba,haruki): http://crbug.com/160932 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 62 // search_string | 62 // search_string |
| 63 // If |search_string| is non-empty, q=... parameter is added, and | 63 // If |search_string| is non-empty, q=... parameter is added, and |
| 64 // max-results=... parameter is adjusted for a search. | 64 // max-results=... parameter is adjusted for a search. |
| 65 // | 65 // |
| 66 // directory_resource_id: | 66 // directory_resource_id: |
| 67 // If |directory_resource_id| is non-empty, a URL for fetching documents in | 67 // If |directory_resource_id| is non-empty, a URL for fetching documents in |
| 68 // a particular directory is generated. | 68 // a particular directory is generated. |
| 69 // | 69 // |
| 70 GURL GenerateResourceListUrl( | 70 GURL GenerateResourceListUrl( |
| 71 const GURL& override_url, | 71 const GURL& override_url, |
| 72 int start_changestamp, | 72 int64 start_changestamp, |
| 73 const std::string& search_string, | 73 const std::string& search_string, |
| 74 const std::string& directory_resource_id) const; | 74 const std::string& directory_resource_id) const; |
| 75 | 75 |
| 76 // Generates a URL for getting or editing the resource entry of | 76 // Generates a URL for getting or editing the resource entry of |
| 77 // the given resource ID. | 77 // the given resource ID. |
| 78 GURL GenerateEditUrl(const std::string& resource_id) const; | 78 GURL GenerateEditUrl(const std::string& resource_id) const; |
| 79 | 79 |
| 80 // Generates a URL for getting or editing the resource entry of the | 80 // Generates a URL for getting or editing the resource entry of the |
| 81 // given resource ID without query params. | 81 // given resource ID without query params. |
| 82 // Note that, in order to access to the WAPI server, it is necessary to | 82 // Note that, in order to access to the WAPI server, it is necessary to |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // list of installed third party applications. | 115 // list of installed third party applications. |
| 116 GURL GenerateAccountMetadataUrl(bool include_installed_apps) const; | 116 GURL GenerateAccountMetadataUrl(bool include_installed_apps) const; |
| 117 | 117 |
| 118 private: | 118 private: |
| 119 const GURL base_url_; | 119 const GURL base_url_; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace google_apis | 122 } // namespace google_apis |
| 123 | 123 |
| 124 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_URL_GENERATOR_H_ | 124 #endif // CHROME_BROWSER_GOOGLE_APIS_GDATA_WAPI_URL_GENERATOR_H_ |
| OLD | NEW |