Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Unified Diff: components/gcm_driver/fake_gcm_driver.cc

Issue 278493002: Split GCMDriver into platform-specific implementations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, and add FakeGCMDriver for unit tests Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/gcm_driver/fake_gcm_driver.cc
diff --git a/components/gcm_driver/fake_gcm_driver.cc b/components/gcm_driver/fake_gcm_driver.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c6e2e2384430e059627540e057b461cb5b84a8fb
--- /dev/null
+++ b/components/gcm_driver/fake_gcm_driver.cc
@@ -0,0 +1,70 @@
+// 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.
+
+#include "components/gcm_driver/fake_gcm_driver.h"
+
+namespace gcm {
+
+FakeGCMDriver::FakeGCMDriver() {
+}
+
+FakeGCMDriver::~FakeGCMDriver() {
+}
+
+void FakeGCMDriver::Enable() {
+}
+
+void FakeGCMDriver::Disable() {
+}
+
+void FakeGCMDriver::Shutdown() {
+}
+
+void FakeGCMDriver::AddAppHandler(
+ const std::string& app_id, GCMAppHandler* handler) {
+}
+
+void FakeGCMDriver::RemoveAppHandler(const std::string& app_id) {
+}
+
+void FakeGCMDriver::Register(const std::string& app_id,
+ const std::vector<std::string>& sender_ids,
+ const RegisterCallback& callback) {
+}
+
+void FakeGCMDriver::Unregister(const std::string& app_id,
+ const UnregisterCallback& callback) {
+}
+
+void FakeGCMDriver::Send(const std::string& app_id,
+ const std::string& receiver_id,
+ const GCMClient::OutgoingMessage& message,
+ const SendCallback& callback) {
+}
+
+GCMClient* FakeGCMDriver::GetGCMClientForTesting() const {
+ return NULL;
+}
+
+bool FakeGCMDriver::IsStarted() const {
+ return true;
+}
+
+bool FakeGCMDriver::IsGCMClientReady() const {
+ return true;
+}
+
+void FakeGCMDriver::GetGCMStatistics(const GetGCMStatisticsCallback& callback,
+ bool clear_logs) {
+}
+
+void FakeGCMDriver::SetGCMRecording(const GetGCMStatisticsCallback& callback,
+ bool recording) {
+}
+
+std::string FakeGCMDriver::SignedInUserName() const {
+ return std::string();
+}
+
+} // namespace gcm

Powered by Google App Engine
This is Rietveld 408576698