OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_GCM_DRIVER_GCM_ACCOUNT_MAPPER_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_ACCOUNT_MAPPER_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_ACCOUNT_MAPPER_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_ACCOUNT_MAPPER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 29 matching lines...) Expand all Loading... |
40 void Initialize(const AccountMappings& account_mappings, | 40 void Initialize(const AccountMappings& account_mappings, |
41 const DispatchMessageCallback& callback); | 41 const DispatchMessageCallback& callback); |
42 | 42 |
43 // Called by AccountTracker, when a new list of account tokens is available. | 43 // Called by AccountTracker, when a new list of account tokens is available. |
44 // This will cause a refresh of account mappings and sending updates to GCM. | 44 // This will cause a refresh of account mappings and sending updates to GCM. |
45 void SetAccountTokens( | 45 void SetAccountTokens( |
46 const std::vector<GCMClient::AccountTokenInfo>& account_tokens); | 46 const std::vector<GCMClient::AccountTokenInfo>& account_tokens); |
47 | 47 |
48 // Implementation of GCMAppHandler: | 48 // Implementation of GCMAppHandler: |
49 void ShutdownHandler() override; | 49 void ShutdownHandler() override; |
| 50 void OnStoreReset() override; |
50 void OnMessage(const std::string& app_id, | 51 void OnMessage(const std::string& app_id, |
51 const IncomingMessage& message) override; | 52 const IncomingMessage& message) override; |
52 void OnMessagesDeleted(const std::string& app_id) override; | 53 void OnMessagesDeleted(const std::string& app_id) override; |
53 void OnSendError( | 54 void OnSendError( |
54 const std::string& app_id, | 55 const std::string& app_id, |
55 const GCMClient::SendErrorDetails& send_error_details) override; | 56 const GCMClient::SendErrorDetails& send_error_details) override; |
56 void OnSendAcknowledged(const std::string& app_id, | 57 void OnSendAcknowledged(const std::string& app_id, |
57 const std::string& message_id) override; | 58 const std::string& message_id) override; |
58 bool CanHandle(const std::string& app_id) const override; | 59 bool CanHandle(const std::string& app_id) const override; |
59 | 60 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 bool initialized_; | 125 bool initialized_; |
125 | 126 |
126 base::WeakPtrFactory<GCMAccountMapper> weak_ptr_factory_; | 127 base::WeakPtrFactory<GCMAccountMapper> weak_ptr_factory_; |
127 | 128 |
128 DISALLOW_COPY_AND_ASSIGN(GCMAccountMapper); | 129 DISALLOW_COPY_AND_ASSIGN(GCMAccountMapper); |
129 }; | 130 }; |
130 | 131 |
131 } // namespace gcm | 132 } // namespace gcm |
132 | 133 |
133 #endif // COMPONENTS_GCM_DRIVER_GCM_ACCOUNT_MAPPER_H_ | 134 #endif // COMPONENTS_GCM_DRIVER_GCM_ACCOUNT_MAPPER_H_ |
OLD | NEW |