| Index: google_apis/gaia/fake_gaia.cc
|
| diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc
|
| index ce62f1f1703db8c5dd91fcf770e6483c8d8a787e..7ec5af739ecee3bf829d0d35593a5bcde87783b4 100644
|
| --- a/google_apis/gaia/fake_gaia.cc
|
| +++ b/google_apis/gaia/fake_gaia.cc
|
| @@ -298,6 +298,11 @@ void FakeGaia::Initialize() {
|
| // Handles /oauth2/v1/userinfo call.
|
| REGISTER_RESPONSE_HANDLER(
|
| gaia_urls->oauth_user_info_url(), HandleOAuthUserInfo);
|
| +
|
| + // Handles /GetCheckConnectionInfo GAIA call.
|
| + REGISTER_RESPONSE_HANDLER(
|
| + gaia_urls->GetCheckConnectionInfoURLWithSource(std::string()),
|
| + HandleGetCheckConnectionInfo);
|
| }
|
|
|
| std::unique_ptr<HttpResponse> FakeGaia::HandleRequest(
|
| @@ -443,10 +448,10 @@ void FakeGaia::HandleProgramaticAuth(
|
| http_response->set_content_type("text/html");
|
| }
|
|
|
| -void FakeGaia::FormatJSONResponse(const base::DictionaryValue& response_dict,
|
| +void FakeGaia::FormatJSONResponse(const base::Value& value,
|
| BasicHttpResponse* http_response) {
|
| std::string response_json;
|
| - base::JSONWriter::Write(response_dict, &response_json);
|
| + base::JSONWriter::Write(value, &response_json);
|
| http_response->set_content(response_json);
|
| http_response->set_code(net::HTTP_OK);
|
| }
|
| @@ -840,3 +845,10 @@ void FakeGaia::HandleSAMLRedirect(
|
| http_response->AddCustomHeader("Google-Accounts-SAML", "Start");
|
| http_response->AddCustomHeader("Location", redirect_url);
|
| }
|
| +
|
| +void FakeGaia::HandleGetCheckConnectionInfo(
|
| + const net::test_server::HttpRequest& request,
|
| + net::test_server::BasicHttpResponse* http_response) {
|
| + base::ListValue connection_list;
|
| + FormatJSONResponse(connection_list, http_response);
|
| +}
|
|
|