// 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();
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,
net::test_server::BasicHttpResponse* http_response);
const;
MergeSessionParams merge_session_params_;
+ EmailToGaiaIdMap email_to_gaia_id_map_;
AccessTokenInfoMap access_token_info_map_;
RequestHandlerMap request_handlers_;
std::string service_login_response_;