| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 bool clear_logs) override; | 76 bool clear_logs) override; |
| 77 void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 77 void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| 78 bool recording) override; | 78 bool recording) override; |
| 79 void SetAccountTokens( | 79 void SetAccountTokens( |
| 80 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; | 80 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; |
| 81 void UpdateAccountMapping(const AccountMapping& account_mapping) override; | 81 void UpdateAccountMapping(const AccountMapping& account_mapping) override; |
| 82 void RemoveAccountMapping(const std::string& account_id) override; | 82 void RemoveAccountMapping(const std::string& account_id) override; |
| 83 base::Time GetLastTokenFetchTime() override; | 83 base::Time GetLastTokenFetchTime() override; |
| 84 void SetLastTokenFetchTime(const base::Time& time) override; | 84 void SetLastTokenFetchTime(const base::Time& time) override; |
| 85 void WakeFromSuspendForHeartbeat(bool wake) override; | 85 void WakeFromSuspendForHeartbeat(bool wake) override; |
| 86 void AddHeartbeatInterval(const std::string& scope, int interval_ms) override; |
| 87 void RemoveHeartbeatInterval(const std::string& scope) override; |
| 86 | 88 |
| 87 // Exposed for testing purpose. | 89 // Exposed for testing purpose. |
| 88 bool gcm_enabled() const { return gcm_enabled_; } | 90 bool gcm_enabled() const { return gcm_enabled_; } |
| 89 GCMChannelStatusSyncer* gcm_channel_status_syncer_for_testing() { | 91 GCMChannelStatusSyncer* gcm_channel_status_syncer_for_testing() { |
| 90 return gcm_channel_status_syncer_.get(); | 92 return gcm_channel_status_syncer_.get(); |
| 91 } | 93 } |
| 92 | 94 |
| 93 protected: | 95 protected: |
| 94 // GCMDriver implementation: | 96 // GCMDriver implementation: |
| 95 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; | 97 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 176 |
| 175 // Used to pass a weak pointer to the IO worker. | 177 // Used to pass a weak pointer to the IO worker. |
| 176 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; | 178 base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_; |
| 177 | 179 |
| 178 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); | 180 DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); |
| 179 }; | 181 }; |
| 180 | 182 |
| 181 } // namespace gcm | 183 } // namespace gcm |
| 182 | 184 |
| 183 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ | 185 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_DESKTOP_H_ |
| OLD | NEW |