Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/push_messaging/push_messaging_service_observer.h" | |
| 6 | |
| 7 #include "build/build_config.h" | |
| 8 | |
| 9 #if defined(OS_ANDROID) | |
| 10 #include "chrome/browser/push_messaging/push_messaging_service_observer_android. h" | |
| 11 #endif | |
| 12 | |
| 13 // static | |
| 14 scoped_ptr<PushMessagingServiceObserver> | |
| 15 PushMessagingServiceObserver::Create() { | |
| 16 scoped_ptr<PushMessagingServiceObserver> observer; | |
| 17 #if defined(OS_ANDROID) | |
| 18 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,
| |
| 19 #endif | |
| 20 return observer; | |
| 21 } | |
| OLD | NEW |