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_DRIVER_DESKTOP_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; | 57 virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; |
58 virtual void Enable() OVERRIDE; | 58 virtual void Enable() OVERRIDE; |
59 virtual void Disable() OVERRIDE; | 59 virtual void Disable() OVERRIDE; |
60 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; | 60 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; |
61 virtual bool IsStarted() const OVERRIDE; | 61 virtual bool IsStarted() const OVERRIDE; |
62 virtual bool IsConnected() const OVERRIDE; | 62 virtual bool IsConnected() const OVERRIDE; |
63 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 63 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
64 bool clear_logs) OVERRIDE; | 64 bool clear_logs) OVERRIDE; |
65 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 65 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
66 bool recording) OVERRIDE; | 66 bool recording) OVERRIDE; |
| 67 virtual void UpdateAccountMapping( |
| 68 const AccountMapping& account_mapping) OVERRIDE; |
| 69 virtual void RemoveAccountMapping(const std::string& account_id) OVERRIDE; |
67 | 70 |
68 // GCMDriverDesktop specific implementation. | 71 // GCMDriverDesktop specific implementation. |
69 // Sets a list of accounts with OAuth2 tokens for the next checkin. | 72 // Sets a list of accounts with OAuth2 tokens for the next checkin. |
70 // |account_tokens| maps email addresses to OAuth2 access tokens. | 73 // |account_tokens| maps email addresses to OAuth2 access tokens. |
71 // |account_removed| indicates that an account has been removed since the | 74 // |account_removed| indicates that an account has been removed since the |
72 // last time the callback was called, which triggers an immediate checkin, | 75 // last time the callback was called, which triggers an immediate checkin, |
73 // to ensure that association between device and account is removed. | 76 // to ensure that association between device and account is removed. |
74 void SetAccountsForCheckin( | 77 void SetAccountsForCheckin( |
75 const std::map<std::string, std::string>& account_tokens); | 78 const std::map<std::string, std::string>& account_tokens); |
76 | 79 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 148 |
146 // Used to pass a weak pointer to the IO worker. | 149 // Used to pass a weak pointer to the IO worker. |
147 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 150 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
148 | 151 |
149 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 152 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
150 }; | 153 }; |
151 | 154 |
152 } // namespace gcm | 155 } // namespace gcm |
153 | 156 |
154 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 157 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
OLD | NEW |