| 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_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 virtual void RemoveAccountMapping(const std::string& account_id) = 0; | 205 virtual void RemoveAccountMapping(const std::string& account_id) = 0; |
| 206 | 206 |
| 207 // Getter and setter of last token fetch time. | 207 // Getter and setter of last token fetch time. |
| 208 virtual base::Time GetLastTokenFetchTime() = 0; | 208 virtual base::Time GetLastTokenFetchTime() = 0; |
| 209 virtual void SetLastTokenFetchTime(const base::Time& time) = 0; | 209 virtual void SetLastTokenFetchTime(const base::Time& time) = 0; |
| 210 | 210 |
| 211 // Sets whether or not GCM should try to wake the system from suspend in order | 211 // Sets whether or not GCM should try to wake the system from suspend in order |
| 212 // to send a heartbeat message. | 212 // to send a heartbeat message. |
| 213 virtual void WakeFromSuspendForHeartbeat(bool wake) = 0; | 213 virtual void WakeFromSuspendForHeartbeat(bool wake) = 0; |
| 214 | 214 |
| 215 // Supports InstanceID handling. | 215 // Supports InstanceID handling. Must only be used by the InstanceID system. |
| 216 virtual InstanceIDHandler* GetInstanceIDHandler() = 0; | 216 virtual InstanceIDHandler* GetInstanceIDHandlerInternal() = 0; |
| 217 | 217 |
| 218 // Adds or removes a custom client requested heartbeat interval. If multiple | 218 // Adds or removes a custom client requested heartbeat interval. If multiple |
| 219 // components set that setting, the lowest setting will be used. If the | 219 // components set that setting, the lowest setting will be used. If the |
| 220 // setting is outside of GetMax/MinClientHeartbeatIntervalMs() it will be | 220 // setting is outside of GetMax/MinClientHeartbeatIntervalMs() it will be |
| 221 // ignored. If a new setting is less than the currently used, the connection | 221 // ignored. If a new setting is less than the currently used, the connection |
| 222 // will be reset with the new heartbeat. Client that no longer require | 222 // will be reset with the new heartbeat. Client that no longer require |
| 223 // aggressive heartbeats, should remove their requested interval. Heartbeats | 223 // aggressive heartbeats, should remove their requested interval. Heartbeats |
| 224 // set this way survive connection/Chrome restart. | 224 // set this way survive connection/Chrome restart. |
| 225 // | 225 // |
| 226 // GCM Driver can decide to postpone the action until Client is properly | 226 // GCM Driver can decide to postpone the action until Client is properly |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 DefaultGCMAppHandler default_app_handler_; | 334 DefaultGCMAppHandler default_app_handler_; |
| 335 | 335 |
| 336 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_; | 336 base::WeakPtrFactory<GCMDriver> weak_ptr_factory_; |
| 337 | 337 |
| 338 DISALLOW_COPY_AND_ASSIGN(GCMDriver); | 338 DISALLOW_COPY_AND_ASSIGN(GCMDriver); |
| 339 }; | 339 }; |
| 340 | 340 |
| 341 } // namespace gcm | 341 } // namespace gcm |
| 342 | 342 |
| 343 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ | 343 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_H_ |
| OLD | NEW |