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())); |
+} |