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

Unified Diff: chrome/browser/google_apis/drive_api_url_generator.h

Issue 11804004: Add base_url to DriveApiUrlGenerator. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Introduce kBaseUrlForProduction in DriveApiUrlGenerator Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google_apis/drive_api_url_generator.h
diff --git a/chrome/browser/google_apis/drive_api_url_generator.h b/chrome/browser/google_apis/drive_api_url_generator.h
index eb42af88e917be22384918f3f2670575c8700244..e08f895087b987999ff2edc298f0dba0ef85b5a8 100644
--- a/chrome/browser/google_apis/drive_api_url_generator.h
+++ b/chrome/browser/google_apis/drive_api_url_generator.h
@@ -15,11 +15,14 @@ namespace google_apis {
// servers for production, and a local server for testing.
class DriveApiUrlGenerator {
public:
- // TODO(hidehiko): Pass server name to a constructor in order to inject
- // server path for testing.
- DriveApiUrlGenerator();
+ // |base_url| is the path to the target drive api server.
+ // Note that this is an injecting point for a testing server.
+ explicit DriveApiUrlGenerator(const GURL& base_url);
~DriveApiUrlGenerator();
+ // The base URL for communicating with the production drive api server.
+ static const char kBaseUrlForProduction[];
+
// Returns a URL to fetch "about" data.
GURL GetAboutUrl() const;
@@ -45,6 +48,9 @@ class DriveApiUrlGenerator {
// Returns a URL to fecth a file content.
GURL GetFileUrl(const std::string& file_id) const;
+ private:
+ const GURL base_url_;
+
// This class is copyable hence no DISALLOW_COPY_AND_ASSIGN here.
};
« no previous file with comments | « chrome/browser/chromeos/drive/drive_system_service.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