diff options
author | mlerman@chromium.org <mlerman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 13:51:13 +0000 |
---|---|---|
committer | mlerman@chromium.org <mlerman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 13:51:13 +0000 |
commit | 4a9c6870cea0ef71dea3cced7995a3436718ef38 (patch) | |
tree | 00e7aad8b614fc34486ab2d886f145fd910e7902 /google_apis | |
parent | 26fc6965cbd8996f65548468416096d0b8153918 (diff) | |
download | chromium_src-4a9c6870cea0ef71dea3cced7995a3436718ef38.zip chromium_src-4a9c6870cea0ef71dea3cced7995a3436718ef38.tar.gz chromium_src-4a9c6870cea0ef71dea3cced7995a3436718ef38.tar.bz2 |
non-new-profile-management creates a "no-op" style account_reconcilor,
useful for tracking stats but won't have any real effects.
Modify the AccountReconcilor_unittest to execute with the new_profile_management flag on.
BUG=357693
TEST=Account Reconciler should function normally when
new_profile_management flag is on. Should not have effects when the
flag is off, but UMA stats (histograms) and logging (for
--vmodule=account_reconcilor=1) should still trace the execution path.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272131
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272826
Review URL: https://codereview.chromium.org/276463002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis')
-rw-r--r-- | google_apis/gaia/fake_gaia.cc | 12 | ||||
-rw-r--r-- | google_apis/gaia/fake_gaia.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc index 4cfe604..7d87ce4 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); +} diff --git a/google_apis/gaia/fake_gaia.h b/google_apis/gaia/fake_gaia.h index ef49cd6..13a63e6 100644 --- a/google_apis/gaia/fake_gaia.h +++ b/google_apis/gaia/fake_gaia.h @@ -150,6 +150,8 @@ class FakeGaia { net::test_server::BasicHttpResponse* http_response); void HandleListAccounts(const net::test_server::HttpRequest& request, net::test_server::BasicHttpResponse* http_response); + void HandlePeopleGet(const net::test_server::HttpRequest& request, + net::test_server::BasicHttpResponse* http_response); // Returns the access token associated with |auth_token| that matches the // given |client_id| and |scope_string|. If |scope_string| is empty, the first |