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