Index: components/gcm_driver/fake_gcm_driver.h |
diff --git a/components/gcm_driver/fake_gcm_driver.h b/components/gcm_driver/fake_gcm_driver.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f029d957b31080cf327a0b678bf2603efa8c5977 |
--- /dev/null |
+++ b/components/gcm_driver/fake_gcm_driver.h |
@@ -0,0 +1,50 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
+#define COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "base/macros.h" |
+#include "components/gcm_driver/gcm_driver.h" |
+ |
+namespace gcm { |
+ |
+// 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).
|
+class FakeGCMDriver : public GCMDriver { |
+ public: |
+ FakeGCMDriver(); |
+ virtual ~FakeGCMDriver(); |
+ |
+ // GCMDriver implementation: |
+ virtual void Enable() OVERRIDE; |
+ virtual void Disable() OVERRIDE; |
+ virtual void Shutdown() OVERRIDE; |
+ virtual void AddAppHandler(const std::string& app_id, |
+ GCMAppHandler* handler) OVERRIDE; |
+ virtual void RemoveAppHandler(const std::string& app_id) OVERRIDE; |
+ virtual void Register(const std::string& app_id, |
+ const std::vector<std::string>& sender_ids, |
+ const RegisterCallback& callback) OVERRIDE; |
+ virtual void Unregister(const std::string& app_id, |
+ const UnregisterCallback& callback) OVERRIDE; |
+ virtual void Send(const std::string& app_id, |
+ const std::string& receiver_id, |
+ const GCMClient::OutgoingMessage& message, |
+ const SendCallback& callback) OVERRIDE; |
+ virtual GCMClient* GetGCMClientForTesting() const OVERRIDE; |
+ virtual bool IsStarted() const OVERRIDE; |
+ virtual bool IsGCMClientReady() const OVERRIDE; |
+ virtual void GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
+ bool clear_logs) OVERRIDE; |
+ virtual void SetGCMRecording(const GetGCMStatisticsCallback& callback, |
+ bool recording) OVERRIDE; |
+ virtual std::string SignedInUserName() const OVERRIDE; |
+ |
+ 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_
|
+}; |
+ |
+} // namespace gcm |
+ |
+#endif // COMPONENTS_GCM_DRIVER_FAKE_GCM_DRIVER_H_ |