Index: google_apis/gaia/gaia_auth_fetcher.cc |
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc |
index 04ebd6e3eea84723b4ef6f576b0878071011b2e9..086414f6e6ff5a30317e05c1b7d2b8bc1b50d9dd 100644 |
--- a/google_apis/gaia/gaia_auth_fetcher.cc |
+++ b/google_apis/gaia/gaia_auth_fetcher.cc |
@@ -508,8 +508,8 @@ bool GaiaAuthFetcher::ParseClientLoginToOAuth2Response( |
// static |
bool GaiaAuthFetcher::ParseClientLoginToOAuth2Cookie(const std::string& cookie, |
std::string* auth_code) { |
- std::vector<std::string> parts; |
- base::SplitString(cookie, ';', &parts); |
+ std::vector<std::string> parts = base::SplitString( |
+ cookie, ";", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
// Per documentation, the cookie should have Secure and HttpOnly. |
if (!CookiePartsContains(parts, kClientLoginToOAuth2CookiePartSecure) || |
!CookiePartsContains(parts, kClientLoginToOAuth2CookiePartHttpOnly)) { |