Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: google_apis/drive/drive_api_url_generator.h

Issue 2693093002: Fetch file metadata of files under Team Drives. (Closed)
Patch Set: Use the generated copy constructor by compiler. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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);
hashimoto 2017/02/22 07:04:51 You don't need to have this ctor when there is the
yamaguchi 2017/02/22 08:41:53 Removed as well as changing all constructor calls.
25
26 // For unit tests. Inject commandline flag value.
27 DriveApiUrlGenerator(const GURL& base_url,
28 const GURL& base_thumbnail_url,
29 bool is_team_drive_enabled);
hashimoto 2017/02/22 07:04:51 Boolean argument is usually difficult to read. Ou
yamaguchi 2017/02/22 08:41:53 Done.
30 DriveApiUrlGenerator(const DriveApiUrlGenerator& src);
25 ~DriveApiUrlGenerator(); 31 ~DriveApiUrlGenerator();
26 32
27 // The base URL for communicating with the production drive api server. 33 // The base URL for communicating with the production drive api server.
28 static const char kBaseUrlForProduction[]; 34 static const char kBaseUrlForProduction[];
29 35
30 // The base URL for the thumbnail download server for production. 36 // The base URL for the thumbnail download server for production.
31 static const char kBaseThumbnailUrlForProduction[]; 37 static const char kBaseThumbnailUrlForProduction[];
32 38
33 // Returns a URL to invoke "About: get" method. 39 // Returns a URL to invoke "About: get" method.
34 GURL GetAboutGetUrl() const; 40 GURL GetAboutGetUrl() const;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 int height, 125 int height,
120 bool crop) const; 126 bool crop) const;
121 127
122 // Generates a URL for batch upload. 128 // Generates a URL for batch upload.
123 GURL GetBatchUploadUrl() const; 129 GURL GetBatchUploadUrl() const;
124 130
125 private: 131 private:
126 const GURL base_url_; 132 const GURL base_url_;
127 const GURL base_download_url_; 133 const GURL base_download_url_;
128 const GURL base_thumbnail_url_; 134 const GURL base_thumbnail_url_;
135 const bool enable_team_drives_;
129 136
130 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here. 137 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here.
131 }; 138 };
132 139
133 } // namespace google_apis 140 } // namespace google_apis
134 141
135 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_ 142 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_URL_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698