Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Unified Diff: components/gcm_driver/gcm_account_mapper.h

Issue 961533002: Adding Send to Gaia ID feature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing feedback Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/gcm_driver/gcm_account_mapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2f9522d3a0cf8b32816b79fce10b0961f90077f3 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 sent to Gaia ID.
+ DispatchMessageCallback dispatch_message_callback_;
+
// Clock for timestamping status changes.
scoped_ptr<base::Clock> clock_;
« no previous file with comments | « no previous file | components/gcm_driver/gcm_account_mapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698