| 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_FAKE_GCM_DRIVER_H_ | 5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
| 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/gcm_driver/gcm_driver.h" | 10 #include "components/gcm_driver/gcm_driver.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 GCMConnectionObserver* observer) OVERRIDE; | 29 GCMConnectionObserver* observer) OVERRIDE; |
| 30 virtual void Enable() OVERRIDE; | 30 virtual void Enable() OVERRIDE; |
| 31 virtual void Disable() OVERRIDE; | 31 virtual void Disable() OVERRIDE; |
| 32 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; | 32 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; |
| 33 virtual bool IsStarted() const OVERRIDE; | 33 virtual bool IsStarted() const OVERRIDE; |
| 34 virtual bool IsConnected() const OVERRIDE; | 34 virtual bool IsConnected() const OVERRIDE; |
| 35 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | 35 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
| 36 bool clear_logs) OVERRIDE; | 36 bool clear_logs) OVERRIDE; |
| 37 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, | 37 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
| 38 bool recording) OVERRIDE; | 38 bool recording) OVERRIDE; |
| 39 virtual void SetAccountTokens( |
| 40 const std::vector<GCMClient::AccountTokenInfo>& account_tokens) OVERRIDE; |
| 39 virtual void UpdateAccountMapping( | 41 virtual void UpdateAccountMapping( |
| 40 const AccountMapping& account_mapping) OVERRIDE; | 42 const AccountMapping& account_mapping) OVERRIDE; |
| 41 virtual void RemoveAccountMapping(const std::string& account_id) OVERRIDE; | 43 virtual void RemoveAccountMapping(const std::string& account_id) OVERRIDE; |
| 42 | 44 |
| 43 protected: | 45 protected: |
| 44 // GCMDriver implementation: | 46 // GCMDriver implementation: |
| 45 virtual GCMClient::Result EnsureStarted() OVERRIDE; | 47 virtual GCMClient::Result EnsureStarted() OVERRIDE; |
| 46 virtual void RegisterImpl( | 48 virtual void RegisterImpl( |
| 47 const std::string& app_id, | 49 const std::string& app_id, |
| 48 const std::vector<std::string>& sender_ids) OVERRIDE; | 50 const std::vector<std::string>& sender_ids) OVERRIDE; |
| 49 virtual void UnregisterImpl(const std::string& app_id) OVERRIDE; | 51 virtual void UnregisterImpl(const std::string& app_id) OVERRIDE; |
| 50 virtual void SendImpl(const std::string& app_id, | 52 virtual void SendImpl(const std::string& app_id, |
| 51 const std::string& receiver_id, | 53 const std::string& receiver_id, |
| 52 const GCMClient::OutgoingMessage& message) OVERRIDE; | 54 const GCMClient::OutgoingMessage& message) OVERRIDE; |
| 53 | 55 |
| 54 private: | 56 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); | 57 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); |
| 56 }; | 58 }; |
| 57 | 59 |
| 58 } // namespace gcm | 60 } // namespace gcm |
| 59 | 61 |
| 60 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | 62 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
| OLD | NEW |