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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_observer.cc

Issue 1485743002: Push API: test that default notification is shown on Android when needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@PushMessagingInstrumentationTest
Patch Set: Address bauerb's comments. Created 5 years 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: chrome/browser/push_messaging/push_messaging_service_observer.cc
diff --git a/chrome/browser/push_messaging/push_messaging_service_observer.cc b/chrome/browser/push_messaging/push_messaging_service_observer.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8608639f20270ee5237b27fb12ac2ea0714a37fd
--- /dev/null
+++ b/chrome/browser/push_messaging/push_messaging_service_observer.cc
@@ -0,0 +1,21 @@
+// Copyright 2015 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 "chrome/browser/push_messaging/push_messaging_service_observer.h"
+
+#include "build/build_config.h"
+
+#if defined(OS_ANDROID)
+#include "chrome/browser/push_messaging/push_messaging_service_observer_android.h"
+#endif
+
+// static
+scoped_ptr<PushMessagingServiceObserver>
+PushMessagingServiceObserver::Create() {
+ scoped_ptr<PushMessagingServiceObserver> observer;
+#if defined(OS_ANDROID)
+ observer.reset(new PushMessagingServiceObserverAndroid());
Bernhard Bauer 2015/12/11 16:35:57 You could also `return make_scoped_ptr(new ...)`,
Michael van Ouwerkerk 2015/12/11 17:57:02 So a nullptr cannot be passed to make_scoped_ptr,
+#endif
+ return observer;
+}

Powered by Google App Engine
This is Rietveld 408576698