diff options
author | mlerman@chromium.org <mlerman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-26 15:48:34 +0000 |
---|---|---|
committer | mlerman@chromium.org <mlerman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-26 15:48:34 +0000 |
commit | cdfa7fe0df477f360e56d0c3b7585a2f4c86e272 (patch) | |
tree | b303731f149d7aae33b4c42ee628a3800b476397 /google_apis/gaia | |
parent | f36c3760049daee4f75161e562414209093a2139 (diff) | |
download | chromium_src-cdfa7fe0df477f360e56d0c3b7585a2f4c86e272.zip chromium_src-cdfa7fe0df477f360e56d0c3b7585a2f4c86e272.tar.gz chromium_src-cdfa7fe0df477f360e56d0c3b7585a2f4c86e272.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
Review URL: https://codereview.chromium.org/276463002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'google_apis/gaia')
-rw-r--r-- | google_apis/gaia/fake_gaia.cc | 13 | ||||
-rw-r--r-- | google_apis/gaia/fake_gaia.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/google_apis/gaia/fake_gaia.cc b/google_apis/gaia/fake_gaia.cc index 4cfe604..edf3647 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\":\"%s\"}"; 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,11 @@ 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(base::StringPrintf( + kPeopleGetResponseFormat, "name")); + 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 |