| Index: chrome/browser/services/gcm/gcm_profile_service.cc
|
| diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc
|
| index 3220ce5fb6b882ea3a84e71a75a5dae082e75767..b93c3f7c6148bddaa8489d2b520b503698129016 100644
|
| --- a/chrome/browser/services/gcm/gcm_profile_service.cc
|
| +++ b/chrome/browser/services/gcm/gcm_profile_service.cc
|
| @@ -17,7 +17,7 @@
|
| #include "chrome/common/chrome_version_info.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/gcm/gcm_client_factory.h"
|
| -#include "components/gcm/gcm_driver.h"
|
| +#include "components/gcm/gcm_driver_desktop.h"
|
| #include "components/signin/core/browser/signin_manager.h"
|
| #include "components/user_prefs/pref_registry_syncable.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -89,6 +89,11 @@ void GCMProfileService::Initialize(
|
| scoped_ptr<GCMClientFactory> gcm_client_factory) {
|
| DCHECK(!driver_);
|
|
|
| +#if defined(OS_ANDROID)
|
| + driver_.reset(new GCMDriverAndroid(
|
| + content::BrowserThread::GetMessageLoopProxyForThread(
|
| + content::BrowserThread::UI)));
|
| +#else
|
| scoped_refptr<base::SequencedWorkerPool> worker_pool(
|
| content::BrowserThread::GetBlockingPool());
|
| scoped_refptr<base::SequencedTaskRunner> blocking_task_runner(
|
| @@ -96,17 +101,13 @@ void GCMProfileService::Initialize(
|
| worker_pool->GetSequenceToken(),
|
| base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
|
|
|
| - driver_.reset(new GCMDriver(
|
| + driver_.reset(new GCMDriverDesktop(
|
| GetChromeBuildInfo(),
|
| gcm_client_factory.Pass(),
|
| scoped_ptr<IdentityProvider>(new ProfileIdentityProvider(
|
| SigninManagerFactory::GetForProfile(profile_),
|
| ProfileOAuth2TokenServiceFactory::GetForProfile(profile_),
|
| -#if defined(OS_ANDROID)
|
| - NULL)),
|
| -#else
|
| LoginUIServiceFactory::GetForProfile(profile_))),
|
| -#endif
|
| profile_->GetPath().Append(chrome::kGCMStoreDirname),
|
| profile_->GetRequestContext(),
|
| blocking_task_runner,
|
| @@ -114,6 +115,7 @@ void GCMProfileService::Initialize(
|
| content::BrowserThread::UI),
|
| content::BrowserThread::GetMessageLoopProxyForThread(
|
| content::BrowserThread::IO)));
|
| +#endif
|
| }
|
|
|
| void GCMProfileService::Shutdown() {
|
|
|