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> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 namespace google_apis { | 15 namespace google_apis { |
16 | 16 |
17 // 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 |
18 // servers for production, and a local server for testing. | 18 // servers for production, and a local server for testing. |
19 class DriveApiUrlGenerator { | 19 class DriveApiUrlGenerator { |
20 public: | 20 public: |
21 // |base_url| is the path to the target drive api server. | 21 // |base_url| is the path to the target drive api server. |
22 // Note that this is an injecting point for a testing server. | 22 // Note that this is an injecting point for a testing server. |
23 DriveApiUrlGenerator(const GURL& base_url, | 23 DriveApiUrlGenerator(const GURL& base_url, |
24 const GURL& base_thumbnail_url); | 24 const GURL& base_thumbnail_url); |
| 25 DriveApiUrlGenerator(const DriveApiUrlGenerator& src); |
25 ~DriveApiUrlGenerator(); | 26 ~DriveApiUrlGenerator(); |
26 | 27 |
27 // The base URL for communicating with the production drive api server. | 28 // The base URL for communicating with the production drive api server. |
28 static const char kBaseUrlForProduction[]; | 29 static const char kBaseUrlForProduction[]; |
29 | 30 |
30 // The base URL for the thumbnail download server for production. | 31 // The base URL for the thumbnail download server for production. |
31 static const char kBaseThumbnailUrlForProduction[]; | 32 static const char kBaseThumbnailUrlForProduction[]; |
32 | 33 |
33 // Returns a URL to invoke "About: get" method. | 34 // Returns a URL to invoke "About: get" method. |
34 GURL GetAboutGetUrl() const; | 35 GURL GetAboutGetUrl() const; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 int height, | 120 int height, |
120 bool crop) const; | 121 bool crop) const; |
121 | 122 |
122 // Generates a URL for batch upload. | 123 // Generates a URL for batch upload. |
123 GURL GetBatchUploadUrl() const; | 124 GURL GetBatchUploadUrl() const; |
124 | 125 |
125 private: | 126 private: |
126 const GURL base_url_; | 127 const GURL base_url_; |
127 const GURL base_download_url_; | 128 const GURL base_download_url_; |
128 const GURL base_thumbnail_url_; | 129 const GURL base_thumbnail_url_; |
| 130 const bool enable_team_drives_; |
129 | 131 |
130 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here. | 132 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here. |
131 }; | 133 }; |
132 | 134 |
133 } // namespace google_apis | 135 } // namespace google_apis |
134 | 136 |
135 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ | 137 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ |
OLD | NEW |