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

Unified Diff: google_apis/gaia/gaia_urls.cc

Issue 601643002: Use a distinct source parameter on gaia endpoints for the reconcilor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uber
Patch Set: Address review comments Created 6 years, 3 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: google_apis/gaia/gaia_urls.cc
diff --git a/google_apis/gaia/gaia_urls.cc b/google_apis/gaia/gaia_urls.cc
index acb4c19e38a46bb1b80bb41853aabebbfcae9ec8..1ba0a10ca1b1c24c534428ebc58da51d4a0f399d 100644
--- a/google_apis/gaia/gaia_urls.cc
+++ b/google_apis/gaia/gaia_urls.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/strings/stringprintf.h"
#include "google_apis/gaia/gaia_switches.h"
#include "google_apis/google_api_keys.h"
@@ -245,3 +246,20 @@ const GURL& GaiaUrls::oauth2_revoke_url() const {
const GURL& GaiaUrls::gaia_login_form_realm() const {
return gaia_url_;
}
+
+GURL GaiaUrls::ListAccountsURLWithSource(const std::string& source) {
+ if (source.empty()) {
+ return list_accounts_url();
+ } else {
+ std::string query = list_accounts_url().query();
+ return list_accounts_url().Resolve(
+ base::StringPrintf("?source=%s&%s", source.c_str(), query.c_str()));
+ }
+}
+
+GURL GaiaUrls::GetCheckConnectionInfoURLWithSource(const std::string& source) {
+ return source.empty()
+ ? get_check_connection_info_url()
+ : get_check_connection_info_url().Resolve(
+ base::StringPrintf("?source=%s", source.c_str()));
+}

Powered by Google App Engine
This is Rietveld 408576698