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

Unified Diff: google_apis/gaia/fake_gaia.h

Issue 473153002: Inline sign in extracts gaia id from HTTP header and seeds account tracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix error message 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 side-by-side diff with in-line comments
Download patch
Index: google_apis/gaia/fake_gaia.h
diff --git a/google_apis/gaia/fake_gaia.h b/google_apis/gaia/fake_gaia.h
index 4db3b842e1ae7ad6ad17b947283822bd4cdbd5ff..11d497fc4d98e4ee29c91be8cabecc4450723913 100644
--- a/google_apis/gaia/fake_gaia.h
+++ b/google_apis/gaia/fake_gaia.h
@@ -86,6 +86,11 @@ class FakeGaia {
// Sets the initial value of tokens and cookies.
void SetMergeSessionParams(const MergeSessionParams& params);
+ // Sets the specified |gaia_id| as corresponding to the given |email|
+ // address when setting GAIA response headers. If no mapping is given for
+ // an email address, a default GAIA Id is used.
+ void MapEmailToGaiaId(const std::string& email, const std::string& gaia_id);
+
// Initializes HTTP request handlers. Should be called after switches
// for tweaking GaiaUrls are in place.
void Initialize();
@@ -121,8 +126,11 @@ class FakeGaia {
private:
typedef std::multimap<std::string, AccessTokenInfo> AccessTokenInfoMap;
+ typedef std::map<std::string, std::string> EmailToGaiaIdMap;
typedef std::map<std::string, GURL> SamlAccountIdpMap;
+ std::string GetGaiaIdOfEmail(const std::string& email);
bartfab (slow) 2014/10/21 14:47:47 Nit: Make the method const.
Roger Tawa OOO till Jul 10th 2014/10/21 19:15:31 Done.
+
// Formats a JSON response with the data in |response_dict|.
void FormatJSONResponse(const base::DictionaryValue& response_dict,
net::test_server::BasicHttpResponse* http_response);
@@ -169,6 +177,7 @@ class FakeGaia {
const;
MergeSessionParams merge_session_params_;
+ EmailToGaiaIdMap email_to_gaia_id_map_;
AccessTokenInfoMap access_token_info_map_;
RequestHandlerMap request_handlers_;
std::string service_login_response_;

Powered by Google App Engine
This is Rietveld 408576698