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

Unified Diff: components/gcm/gcm_driver_android.cc

Issue 278493002: Split GCMDriver into platform-specific implementations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/gcm_driver_android.cc
diff --git a/components/gcm/gcm_driver_android.cc b/components/gcm/gcm_driver_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3d2407882570a7d75874228379386742f5921c42
--- /dev/null
+++ b/components/gcm/gcm_driver_android.cc
@@ -0,0 +1,76 @@
+// 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/gcm_driver_android.h"
+
+#include "base/logging.h"
+#include "base/message_loop/message_loop_proxy.h"
+
+namespace gcm {
+
+GCMDriverAndroid::GCMDriverAndroid(
+ const scoped_refptr<base::MessageLoopProxy>& ui_thread)
+ : GCMDriver(ui_thread) {
+}
+
+GCMDriverAndroid::~GCMDriverAndroid() {
+}
+
+void GCMDriverAndroid::Enable() {
+}
+
+void GCMDriverAndroid::Disable() {
+}
+
+void GCMDriverAndroid::Register(const std::string& app_id,
+ const std::vector<std::string>& sender_ids,
+ const RegisterCallback& callback) {
+ DCHECK(ui_thread_->BelongsToCurrentThread());
+
+ // TODO(johnme): Hook up to Android GCM API via JNI.
+ NOTIMPLEMENTED();
+}
+
+void GCMDriverAndroid::Unregister(const std::string& app_id,
+ const UnregisterCallback& callback) {
+ DCHECK(ui_thread_->BelongsToCurrentThread());
+
+ // TODO(johnme): Hook up to Android GCM API via JNI.
+ NOTIMPLEMENTED();
+}
+
+void GCMDriverAndroid::Send(const std::string& app_id,
+ const std::string& receiver_id,
+ const GCMClient::OutgoingMessage& message,
+ const SendCallback& callback) {
+ NOTIMPLEMENTED();
+}
+
+GCMClient* GCMDriverAndroid::GetGCMClientForTesting() const {
+ return NULL;
+}
+
+bool GCMDriverAndroid::IsStarted() const {
+ return true;
+}
+
+bool GCMDriverAndroid::IsGCMClientReady() const {
+ return true;
+}
+
+std::string GCMDriverAndroid::SignedInUserName() const {
+ return "";
+}
+
+void GCMDriverAndroid::GetGCMStatistics(GetGCMStatisticsCallback callback,
+ bool clear_logs) {
+ NOTIMPLEMENTED();
+}
+
+void GCMDriverAndroid::SetGCMRecording(GetGCMStatisticsCallback callback,
+ bool recording) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace gcm

Powered by Google App Engine
This is Rietveld 408576698