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

Side by Side Diff: chrome/browser/services/gcm/gcm_client_factory.cc

Issue 246863004: WIP initial sketch for an Android GCMClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | google_apis/gcm/gcm.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
OLDNEW
« no previous file with comments | « no previous file | google_apis/gcm/gcm.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698