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..0b64443491464be5f8703c6646c805475c01df74 |
--- /dev/null |
+++ b/chrome/browser/push_messaging/push_messaging_service_observer.cc |
@@ -0,0 +1,19 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
Peter Beverloo
2015/12/10 18:47:51
With an #ifdef you'd be able to avoid having this
Michael van Ouwerkerk
2015/12/11 11:23:54
I'm not sure how you would avoid defining this fil
Peter Beverloo
2015/12/11 11:30:03
My question is why we need the Create() method at
Michael van Ouwerkerk
2015/12/11 11:38:24
That would move the ifdef to the callsite. One of
|
+// 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 |
+PushMessagingServiceObserver* PushMessagingServiceObserver::Create() { |
+#if defined(OS_ANDROID) |
+ return new PushMessagingServiceObserverAndroid(); |
+#endif |
+ return nullptr; |
+} |