OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_ |
| 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "googleurl/src/gurl.h" |
| 11 |
| 12 namespace google_apis { |
| 13 |
| 14 // This class is used to generate URLs for communicating with drive api |
| 15 // servers for production, and a local server for testing. |
| 16 class DriveApiUrlGenerator { |
| 17 public: |
| 18 // TODO(hidehiko): Pass server name to a constructor in order to inject |
| 19 // server path for testing. |
| 20 DriveApiUrlGenerator(); |
| 21 ~DriveApiUrlGenerator(); |
| 22 |
| 23 // Returns a URL to fetch "about" data. |
| 24 GURL GetAboutUrl() const; |
| 25 |
| 26 // Returns a URL to fetch "applist" data. |
| 27 GURL GetApplistUrl() const; |
| 28 |
| 29 // Returns a URL to fetch a list of changes. |
| 30 // override_url: |
| 31 // The base url for the fetch. If empty, the default url is used. |
| 32 // start_changestamp: |
| 33 // The starting point of the requesting change list, or 0 if all changes |
| 34 // are necessary. |
| 35 GURL GetChangelistUrl( |
| 36 const GURL& override_url, int64 start_changestamp) const; |
| 37 |
| 38 // Returns a URL to fetch a list of files with the given |search_string|. |
| 39 // override_url: |
| 40 // The base url for the fetching. If empty, the default url is used. |
| 41 // search_string: The search query. |
| 42 GURL GetFilelistUrl( |
| 43 const GURL& override_url, const std::string& search_string) const; |
| 44 |
| 45 // Returns a URL to fecth a file content. |
| 46 GURL GetFileUrl(const std::string& file_id) const; |
| 47 |
| 48 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here. |
| 49 }; |
| 50 |
| 51 } // namespace google_apis |
| 52 |
| 53 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_ |
OLD | NEW |