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

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: 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..f417580d1c77956be87cad206b1914d836291d99 100644
--- a/chrome/browser/google_apis/drive_api_url_generator.h
+++ b/chrome/browser/google_apis/drive_api_url_generator.h
@@ -15,9 +15,10 @@ 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.
+ // If empty, the default production server is used.
satorux1 2013/01/09 00:19:53 Let's not use the empty URL.
hidehiko 2013/01/09 04:47:37 Done.
+ // Note that this is an injecting point for a testing server.
+ explicit DriveApiUrlGenerator(const GURL& base_url);
~DriveApiUrlGenerator();
// Returns a URL to fetch "about" data.
@@ -45,6 +46,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.
};

Powered by Google App Engine
This is Rietveld 408576698