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..e00a80a7f4d82a22ef16085cc9d54f21cbfab14b 100644 |
--- a/google_apis/gaia/fake_gaia.h |
+++ b/google_apis/gaia/fake_gaia.h |
@@ -86,6 +86,11 @@ |
// 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,7 +126,14 @@ |
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) const; |
+ |
+ void AddGoogleAccountsSigninHeader( |
+ net::test_server::BasicHttpResponse* http_response, |
+ const std::string& email) const; |
// Formats a JSON response with the data in |response_dict|. |
void FormatJSONResponse(const base::DictionaryValue& response_dict, |
@@ -169,6 +181,7 @@ |
const; |
MergeSessionParams merge_session_params_; |
+ EmailToGaiaIdMap email_to_gaia_id_map_; |
AccessTokenInfoMap access_token_info_map_; |
RequestHandlerMap request_handlers_; |
std::string service_login_response_; |