| Index: google_apis/gaia/fake_gaia.h
|
| diff --git a/google_apis/gaia/fake_gaia.h b/google_apis/gaia/fake_gaia.h
|
| index e50b7cb37bbaceddbcd7521f794eeb5953da788b..295a11bb46c6e4c6617308d6e5a4dd6ded33f2f3 100644
|
| --- a/google_apis/gaia/fake_gaia.h
|
| +++ b/google_apis/gaia/fake_gaia.h
|
| @@ -32,6 +32,7 @@ class HttpResponse;
|
| class FakeGaia {
|
| public:
|
| typedef std::set<std::string> ScopeSet;
|
| + typedef std::map<std::string, std::string> RefreshTokenToDeviceIdMap;
|
|
|
| // Access token details used for token minting and the token info endpoint.
|
| struct AccessTokenInfo {
|
| @@ -52,6 +53,9 @@ class FakeGaia {
|
| MergeSessionParams();
|
| ~MergeSessionParams();
|
|
|
| + // Updates params with non-empty values from |update|.
|
| + void Update(const MergeSessionParams& update);
|
| +
|
| // Values of SID and LSID cookie that are set by /ServiceLoginAuth or its
|
| // equivalent at the end of the SAML login flow.
|
| std::string auth_sid_cookie;
|
| @@ -86,6 +90,9 @@ class FakeGaia {
|
| // Sets the initial value of tokens and cookies.
|
| void SetMergeSessionParams(const MergeSessionParams& params);
|
|
|
| + // Updates various params with non-empty values from |update|.
|
| + void UpdateMergeSessionParams(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.
|
| @@ -122,6 +129,17 @@ class FakeGaia {
|
| static bool GetQueryParameter(const std::string& query,
|
| const std::string& key,
|
| std::string* value);
|
| +
|
| + // Returns a device ID associated with a given refresh token.
|
| + std::string GetDeviceIdByRefreshToken(const std::string& refresh_token) const;
|
| +
|
| + void SetRefreshTokenToDeviceIdMap(
|
| + const RefreshTokenToDeviceIdMap& refresh_token_to_device_id_map);
|
| +
|
| + const RefreshTokenToDeviceIdMap& refresh_token_to_device_id_map() const {
|
| + return refresh_token_to_device_id_map_;
|
| + }
|
| +
|
| protected:
|
| // HTTP handler for /MergeSession.
|
| virtual void HandleMergeSession(
|
| @@ -210,6 +228,7 @@ class FakeGaia {
|
| std::string embedded_setup_chromeos_response_;
|
| SamlAccountIdpMap saml_account_idp_map_;
|
| bool issue_oauth_code_cookie_;
|
| + RefreshTokenToDeviceIdMap refresh_token_to_device_id_map_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeGaia);
|
| };
|
|
|