Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: google_apis/gaia/fake_gaia.cc

Issue 276463002: non-new-profile-management creates a "no-op" style account_reconcilor, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/gaia/fake_gaia.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/fake_gaia.cc
diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc
index 4cfe6040e53e0ab68bc4dac93116348e3fa8caf1..7d87ce4928f1241c4020484aa6e1bd3635a6ed0c 100644
--- a/google_apis/gaia/fake_gaia.cc
+++ b/google_apis/gaia/fake_gaia.cc
@@ -50,6 +50,7 @@ const char kAuthHeaderOAuth[] = "OAuth ";
const char kListAccountsResponseFormat[] =
"[\"gaia.l.a.r\",[[\"gaia.l.a\",1,\"\",\"%s\",\"\",1,1,0]]]";
+const char kPeopleGetResponseFormat[] = "{\"id\":\"name\"}";
typedef std::map<std::string, std::string> CookieMap;
@@ -176,6 +177,10 @@ void FakeGaia::Initialize() {
// Handles /ListAccounts GAIA call.
REGISTER_RESPONSE_HANDLER(
gaia_urls->list_accounts_url(), HandleListAccounts);
+
+ // Handles /plus/v1/people/me
+ REGISTER_RESPONSE_HANDLER(
+ gaia_urls->people_get_url(), HandlePeopleGet);
}
scoped_ptr<HttpResponse> FakeGaia::HandleRequest(const HttpRequest& request) {
@@ -529,3 +534,10 @@ void FakeGaia::HandleListAccounts(const HttpRequest& request,
kListAccountsResponseFormat, merge_session_params_.email.c_str()));
http_response->set_code(net::HTTP_OK);
}
+
+
+void FakeGaia::HandlePeopleGet(const HttpRequest& request,
+ BasicHttpResponse* http_response) {
+ http_response->set_content(kPeopleGetResponseFormat);
+ http_response->set_code(net::HTTP_OK);
+}
« no previous file with comments | « google_apis/gaia/fake_gaia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698