OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/services/gcm/gcm_client_factory.h" | 5 #include "chrome/browser/services/gcm/gcm_client_factory.h" |
6 | 6 |
| 7 #if defined(OS_ANDROID) |
| 8 #include "google_apis/gcm/gcm_client_impl_android.h" |
| 9 #else |
7 #include "google_apis/gcm/gcm_client_impl.h" | 10 #include "google_apis/gcm/gcm_client_impl.h" |
| 11 #endif |
8 | 12 |
9 namespace gcm { | 13 namespace gcm { |
10 | 14 |
11 scoped_ptr<GCMClient> GCMClientFactory::BuildInstance() { | 15 scoped_ptr<GCMClient> GCMClientFactory::BuildInstance() { |
| 16 #if defined(OS_ANDROID) |
| 17 return scoped_ptr<GCMClient>(new GCMClientImplAndroid()); |
| 18 #else |
12 return scoped_ptr<GCMClient>(new GCMClientImpl( | 19 return scoped_ptr<GCMClient>(new GCMClientImpl( |
13 make_scoped_ptr<GCMInternalsBuilder>(new GCMInternalsBuilder()))); | 20 make_scoped_ptr<GCMInternalsBuilder>(new GCMInternalsBuilder()))); |
| 21 #endif |
14 } | 22 } |
15 | 23 |
16 GCMClientFactory::GCMClientFactory() { | 24 GCMClientFactory::GCMClientFactory() { |
17 } | 25 } |
18 | 26 |
19 GCMClientFactory::~GCMClientFactory() { | 27 GCMClientFactory::~GCMClientFactory() { |
20 } | 28 } |
21 | 29 |
22 } // namespace gcm | 30 } // namespace gcm |
OLD | NEW |