Chromium Code Reviews| Index: components/gcm_driver/gcm_account_mapper.h |
| diff --git a/components/gcm_driver/gcm_account_mapper.h b/components/gcm_driver/gcm_account_mapper.h |
| index 5616236dab409731dc3da05b6408eb8f9b503c30..15f8c7ab5470a9d4ebcadba31dcc0a6fce86e3ce 100644 |
| --- a/components/gcm_driver/gcm_account_mapper.h |
| +++ b/components/gcm_driver/gcm_account_mapper.h |
| @@ -8,6 +8,7 @@ |
| #include <string> |
| #include <vector> |
| +#include "base/callback.h" |
| #include "base/macros.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/memory/weak_ptr.h" |
| @@ -29,11 +30,15 @@ class GCMAccountMapper : public GCMAppHandler { |
| public: |
| // List of account mappings. |
| typedef std::vector<AccountMapping> AccountMappings; |
| + typedef base::Callback<void(const std::string& app_id, |
| + const GCMClient::IncomingMessage& message)> |
| + DispatchMessageCallback; |
| explicit GCMAccountMapper(GCMDriver* gcm_driver); |
| ~GCMAccountMapper() override; |
| - void Initialize(const AccountMappings& account_mappings); |
| + void Initialize(const AccountMappings& account_mappings, |
| + const DispatchMessageCallback& callback); |
| // Called by AccountTracker, when a new list of account tokens is available. |
| // This will cause a refresh of account mappings and sending updates to GCM. |
| @@ -102,6 +107,9 @@ class GCMAccountMapper : public GCMAppHandler { |
| // GCMDriver owns GCMAccountMapper. |
| GCMDriver* gcm_driver_; |
| + // Callback to GCMDriver to dispatch messages send to Gaia ID. |
|
Nicolas Zea
2015/02/27 21:33:21
nit: s/send/sent
fgorski
2015/02/27 22:12:19
Done.
|
| + DispatchMessageCallback dispatch_message_callback_; |
| + |
| // Clock for timestamping status changes. |
| scoped_ptr<base::Clock> clock_; |