// from the server if it hadn't yet.
// |account_mappings|: a persisted list of accounts mapped to this GCM
// client.
- virtual void OnGCMReady(
- const std::vector<AccountMapping>& account_mappings) = 0;
+ // |last_token_fetch_time|: time of a last successful token fetch.
+ virtual void OnGCMReady(const std::vector<AccountMapping>& account_mappings,
+ const base::Time& last_token_fetch_time) = 0;
// Called when activities are being recorded and a new activity has just
// been recorded.
virtual GCMStatistics GetStatistics() const = 0;
// Sets a list of accounts with OAuth2 tokens for the next checkin.
- // |account_tokens| maps email addresses to OAuth2 access tokens.
- virtual void SetAccountsForCheckin(
- const std::map<std::string, std::string>& account_tokens) = 0;
+ // |account_tokens|: list of email addresses, account IDs and OAuth2 access
+ // tokens.
+ virtual void SetAccountTokens(
+ const std::vector<AccountTokenInfo>& account_tokens) = 0;
// Persists the |account_mapping| in the store.
virtual void UpdateAccountMapping(const AccountMapping& account_mapping) = 0;
// Removes the account mapping related to |account_id| from the persistent
// store.
virtual void RemoveAccountMapping(const std::string& account_id) = 0;
+
+ // Sets last token fetch time in persistent store.
+ virtual void SetLastTokenFetchTime(const base::Time& time) = 0;
};
} // namespace gcm