Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | |
| 6 #define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "base/macros.h" | |
| 10 #include "components/gcm_driver/gcm_driver.h" | |
| 11 | |
| 12 namespace gcm { | |
| 13 | |
| 14 // A do-nothing implementation of GCMDriver. | |
|
jianli
2014/05/29 07:34:03
nit: comment is not needed
johnme
2014/05/29 17:40:55
Done (removed).
| |
| 15 class FakeGCMDriver : public GCMDriver { | |
| 16 public: | |
| 17 FakeGCMDriver(); | |
| 18 virtual ~FakeGCMDriver(); | |
| 19 | |
| 20 // GCMDriver implementation: | |
| 21 virtual void Enable() OVERRIDE; | |
| 22 virtual void Disable() OVERRIDE; | |
| 23 virtual void Shutdown() OVERRIDE; | |
| 24 virtual void AddAppHandler(const std::string& app_id, | |
| 25 GCMAppHandler* handler) OVERRIDE; | |
| 26 virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; | |
| 27 virtual void Register(const std::string& app_id, | |
| 28 const std::vector<std::string>& sender_ids, | |
| 29 const RegisterCallback& callback) OVERRIDE; | |
| 30 virtual void Unregister(const std::string& app_id, | |
| 31 const UnregisterCallback& callback) OVERRIDE; | |
| 32 virtual void Send(const std::string& app_id, | |
| 33 const std::string& receiver_id, | |
| 34 const GCMClient::OutgoingMessage& message, | |
| 35 const SendCallback& callback) OVERRIDE; | |
| 36 virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; | |
| 37 virtual bool IsStarted() const OVERRIDE; | |
| 38 virtual bool IsGCMClientReady() const OVERRIDE; | |
| 39 virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, | |
| 40 bool clear_logs) OVERRIDE; | |
| 41 virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, | |
| 42 bool recording) OVERRIDE; | |
| 43 virtual std::string SignedInUserName() const OVERRIDE; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); | |
|
jianli
2014/05/29 07:34:03
nit: add private before this line
johnme
2014/05/29 17:40:55
Done (and added a DISALLOW_COPY_AND_ASSIGN to gcm_
| |
| 46 }; | |
| 47 | |
| 48 } // namespace gcm | |
| 49 | |
| 50 #endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ | |
| OLD | NEW |