Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / components / gcm_driver / gcm_client.h
index 740a3c7..9956c10 100644 (file)
@@ -203,8 +203,9 @@ class GCMClient {
     // 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.
@@ -284,9 +285,10 @@ class GCMClient {
   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;
@@ -294,6 +296,9 @@ class GCMClient {
   // 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