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

Side by Side Diff: chrome/browser/google_apis/drive_api_url_generator.h

Issue 22909041: Refactor GetAboutRequest and GetApplistRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
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 CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "url/gurl.h" 10 #include "url/gurl.h"
11 11
12 namespace google_apis { 12 namespace google_apis {
13 13
14 // This class is used to generate URLs for communicating with drive api 14 // This class is used to generate URLs for communicating with drive api
15 // servers for production, and a local server for testing. 15 // servers for production, and a local server for testing.
16 class DriveApiUrlGenerator { 16 class DriveApiUrlGenerator {
17 public: 17 public:
18 // |base_url| is the path to the target drive api server. 18 // |base_url| is the path to the target drive api server.
19 // Note that this is an injecting point for a testing server. 19 // Note that this is an injecting point for a testing server.
20 DriveApiUrlGenerator(const GURL& base_url, const GURL& base_download_url); 20 DriveApiUrlGenerator(const GURL& base_url, const GURL& base_download_url);
21 ~DriveApiUrlGenerator(); 21 ~DriveApiUrlGenerator();
22 22
23 // The base URL for communicating with the production drive api server. 23 // The base URL for communicating with the production drive api server.
24 static const char kBaseUrlForProduction[]; 24 static const char kBaseUrlForProduction[];
25 25
26 // The base URL for the file download server for production. 26 // The base URL for the file download server for production.
27 static const char kBaseDownloadUrlForProduction[]; 27 static const char kBaseDownloadUrlForProduction[];
28 28
29 // Returns a URL to fetch "about" data. 29 // Returns a URL to invoke "About: get" method.
30 GURL GetAboutUrl() const; 30 GURL GetAboutGetUrl() const;
31 31
32 // Returns a URL to fetch "applist" data. 32 // Returns a URL to invoke "Apps: list" method.
33 GURL GetApplistUrl() const; 33 GURL GetAppsListUrl() const;
34 34
35 // Returns a URL to fetch a list of changes. 35 // Returns a URL to fetch a list of changes.
36 // include_deleted: 36 // include_deleted:
37 // Set to true if the requesting change list should contain the deleted 37 // Set to true if the requesting change list should contain the deleted
38 // entries. Otherwise false. 38 // entries. Otherwise false.
39 // start_changestamp: 39 // start_changestamp:
40 // The starting point of the requesting change list, or 0 if all changes 40 // The starting point of the requesting change list, or 0 if all changes
41 // are necessary. 41 // are necessary.
42 // max_results: 42 // max_results:
43 // The max of the number of files resource in the response. 43 // The max of the number of files resource in the response.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 private: 95 private:
96 const GURL base_url_; 96 const GURL base_url_;
97 const GURL base_download_url_; 97 const GURL base_download_url_;
98 98
99 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here. 99 // This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here.
100 }; 100 };
101 101
102 } // namespace google_apis 102 } // namespace google_apis
103 103
104 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_ 104 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_API_URL_GENERATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_requests_unittest.cc ('k') | chrome/browser/google_apis/drive_api_url_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698