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

Unified Diff: google_apis/gaia/gaia_urls.cc

Issue 2952903002: ChromeOS: Add support for Gaia v2 API to FakeGaia and screen handler. (Closed)
Patch Set: Disable v2 by default Created 3 years, 6 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
« no previous file with comments | « google_apis/gaia/gaia_urls.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/gaia_urls.cc
diff --git a/google_apis/gaia/gaia_urls.cc b/google_apis/gaia/gaia_urls.cc
index bff2ab39e25c6d7c9bac85768566efeca8868924..e314a10292551527f4290c2ff3fe8c9ae1bd192d 100644
--- a/google_apis/gaia/gaia_urls.cc
+++ b/google_apis/gaia/gaia_urls.cc
@@ -20,7 +20,8 @@ const char kDefaultGoogleApisBaseUrl[] = "https://www.googleapis.com";
// API calls from accounts.google.com
const char kClientLoginUrlSuffix[] = "ClientLogin";
const char kServiceLoginUrlSuffix[] = "ServiceLogin";
-const char kEmbeddedSetupChromeOsUrlSuffix[] = "embedded/setup/chromeos";
+const char kEmbeddedSetupChromeOsUrlSuffixV1[] = "embedded/setup/chromeos";
+const char kEmbeddedSetupChromeOsUrlSuffixV2[] = "embedded/setup/v2/chromeos";
const char kServiceLoginAuthUrlSuffix[] = "ServiceLoginAuth";
const char kServiceLogoutUrlSuffix[] = "Logout";
const char kIssueAuthTokenUrlSuffix[] = "IssueAuthToken";
@@ -97,8 +98,10 @@ GaiaUrls::GaiaUrls() {
// URLs from accounts.google.com.
client_login_url_ = gaia_url_.Resolve(kClientLoginUrlSuffix);
service_login_url_ = gaia_url_.Resolve(kServiceLoginUrlSuffix);
- embedded_setup_chromeos_url_ =
- gaia_url_.Resolve(kEmbeddedSetupChromeOsUrlSuffix);
+ embedded_setup_chromeos_url_v1_ =
+ gaia_url_.Resolve(kEmbeddedSetupChromeOsUrlSuffixV1);
+ embedded_setup_chromeos_url_v2_ =
+ gaia_url_.Resolve(kEmbeddedSetupChromeOsUrlSuffixV2);
service_login_auth_url_ = gaia_url_.Resolve(kServiceLoginAuthUrlSuffix);
service_logout_url_ = gaia_url_.Resolve(kServiceLogoutUrlSuffix);
issue_auth_token_url_ = gaia_url_.Resolve(kIssueAuthTokenUrlSuffix);
@@ -160,8 +163,13 @@ const GURL& GaiaUrls::service_login_url() const {
return service_login_url_;
}
-const GURL& GaiaUrls::embedded_setup_chromeos_url() const {
- return embedded_setup_chromeos_url_;
+const GURL& GaiaUrls::embedded_setup_chromeos_url(unsigned version) const {
+ DCHECK_GT(version, 0U);
+ DCHECK_LE(version, 2U);
+ if (version == 2U)
+ return embedded_setup_chromeos_url_v2_;
+
+ return embedded_setup_chromeos_url_v1_;
}
« no previous file with comments | « google_apis/gaia/gaia_urls.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698