Index: google_apis/gaia/gaia_auth_util.cc |
diff --git a/google_apis/gaia/gaia_auth_util.cc b/google_apis/gaia/gaia_auth_util.cc |
index d8cac90d54ca2f2a71cbdef2c71ab012bc1ae7de..17fcae69bc469b1192ab04ad94d936593b17447c 100644 |
--- a/google_apis/gaia/gaia_auth_util.cc |
+++ b/google_apis/gaia/gaia_auth_util.cc |
@@ -9,6 +9,8 @@ |
#include "base/logging.h" |
#include "base/string_split.h" |
#include "base/string_util.h" |
+#include "google_apis/gaia/gaia_urls.h" |
+#include "googleurl/src/gurl.h" |
namespace gaia { |
@@ -58,4 +60,13 @@ std::string ExtractDomainName(const std::string& email_address) { |
return std::string(); |
} |
+bool IsGaiaSignonRealm(const GURL& url) { |
+ if (!url.SchemeIsSecure()) |
+ return false; |
+ |
+ // Also check "https://www.google.com" to support old style dasher logins. |
+ return url == GURL(GaiaUrls::GetInstance()->gaia_origin_url()) || |
+ url == GURL("https://www.google.com/"); |
+} |
+ |
} // namespace gaia |