| 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 ca6054a33076852a7069e7ec4de4df8cb3d404ac..0940d3c8ea0fecb16cbe6e85b195622f580ef2eb 100644
|
| --- a/google_apis/gaia/gaia_auth_fetcher.cc
|
| +++ b/google_apis/gaia/gaia_auth_fetcher.cc
|
| @@ -72,6 +72,19 @@ bool ExtractOAuth2TokenPairResponse(const std::string& data,
|
| return true;
|
| }
|
|
|
| +void GetCookiesFromResponse(const net::HttpResponseHeaders* headers,
|
| + net::ResponseCookies* cookies) {
|
| + if (!headers)
|
| + return;
|
| +
|
| + std::string value;
|
| + size_t iter = 0;
|
| + while (headers->EnumerateHeader(&iter, "Set-Cookie", &value)) {
|
| + if (!value.empty())
|
| + cookies->push_back(value);
|
| + }
|
| +}
|
| +
|
| const char kListIdpServiceRequested[] = "list_idp";
|
| const char kGetTokenResponseRequested[] = "get_token";
|
|
|
| @@ -944,8 +957,9 @@ void GaiaAuthFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
|
| DVLOG(2) << "data: " << data << "\n";
|
| #endif
|
|
|
| - DispatchFetchedRequest(url, data, source->GetCookies(), status,
|
| - response_code);
|
| + net::ResponseCookies cookies;
|
| + GetCookiesFromResponse(source->GetResponseHeaders(), &cookies);
|
| + DispatchFetchedRequest(url, data, cookies, status, response_code);
|
| }
|
|
|
| void GaiaAuthFetcher::DispatchFetchedRequest(
|
|
|