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

Side by Side Diff: google_apis/gaia/fake_gaia.cc

Issue 601643002: Use a distinct source parameter on gaia endpoints for the reconcilor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uber
Patch Set: Remove functions Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « components/signin/core/browser/signin_manager.cc ('k') | google_apis/gaia/gaia_auth_fetcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "google_apis/gaia/fake_gaia.h" 5 #include "google_apis/gaia/fake_gaia.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 // Handles /oauth2/v2/tokeninfo GAIA call. 195 // Handles /oauth2/v2/tokeninfo GAIA call.
196 REGISTER_RESPONSE_HANDLER( 196 REGISTER_RESPONSE_HANDLER(
197 gaia_urls->oauth2_token_info_url(), HandleTokenInfo); 197 gaia_urls->oauth2_token_info_url(), HandleTokenInfo);
198 198
199 // Handles /oauth2/v2/IssueToken GAIA call. 199 // Handles /oauth2/v2/IssueToken GAIA call.
200 REGISTER_RESPONSE_HANDLER( 200 REGISTER_RESPONSE_HANDLER(
201 gaia_urls->oauth2_issue_token_url(), HandleIssueToken); 201 gaia_urls->oauth2_issue_token_url(), HandleIssueToken);
202 202
203 // Handles /ListAccounts GAIA call. 203 // Handles /ListAccounts GAIA call.
204 REGISTER_RESPONSE_HANDLER( 204 REGISTER_RESPONSE_HANDLER(
205 gaia_urls->list_accounts_url(), HandleListAccounts); 205 gaia_urls->ListAccountsURLWithSource(std::string()), HandleListAccounts);
206 206
207 // Handles /GetUserInfo GAIA call. 207 // Handles /GetUserInfo GAIA call.
208 REGISTER_RESPONSE_HANDLER( 208 REGISTER_RESPONSE_HANDLER(
209 gaia_urls->get_user_info_url(), HandleGetUserInfo); 209 gaia_urls->get_user_info_url(), HandleGetUserInfo);
210 } 210 }
211 211
212 scoped_ptr<HttpResponse> FakeGaia::HandleRequest(const HttpRequest& request) { 212 scoped_ptr<HttpResponse> FakeGaia::HandleRequest(const HttpRequest& request) {
213 // The scheme and host of the URL is actually not important but required to 213 // The scheme and host of the URL is actually not important but required to
214 // get a valid GURL in order to parse |request.relative_url|. 214 // get a valid GURL in order to parse |request.relative_url|.
215 GURL request_url = GURL("http://localhost").Resolve(request.relative_url); 215 GURL request_url = GURL("http://localhost").Resolve(request.relative_url);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 } 573 }
574 574
575 void FakeGaia::HandleGetUserInfo(const HttpRequest& request, 575 void FakeGaia::HandleGetUserInfo(const HttpRequest& request,
576 BasicHttpResponse* http_response) { 576 BasicHttpResponse* http_response) {
577 http_response->set_content(base::StringPrintf( 577 http_response->set_content(base::StringPrintf(
578 "email=%s\ndisplayEmail=%s", 578 "email=%s\ndisplayEmail=%s",
579 merge_session_params_.email.c_str(), 579 merge_session_params_.email.c_str(),
580 merge_session_params_.email.c_str())); 580 merge_session_params_.email.c_str()));
581 http_response->set_code(net::HTTP_OK); 581 http_response->set_code(net::HTTP_OK);
582 } 582 }
OLDNEW
« no previous file with comments | « components/signin/core/browser/signin_manager.cc ('k') | google_apis/gaia/gaia_auth_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698