| 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 95bf473bbd7ce523b19674a1ca0bb111e9eabf9b..45801b91d28e302a9b6968b4010bf94fa135c274 100644
|
| --- a/chrome/browser/services/gcm/gcm_profile_service.cc
|
| +++ b/chrome/browser/services/gcm/gcm_profile_service.cc
|
| @@ -4,27 +4,29 @@
|
|
|
| #include "chrome/browser/services/gcm/gcm_profile_service.h"
|
|
|
| -#include "base/files/file_path.h"
|
| #include "base/logging.h"
|
| #include "base/prefs/pref_service.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/common/pref_names.h"
|
| +#include "components/pref_registry/pref_registry_syncable.h"
|
| +
|
| +#if defined(OS_ANDROID)
|
| +#include "components/gcm_driver/gcm_driver_android.h"
|
| +#else
|
| +#include "base/files/file_path.h"
|
| #include "chrome/browser/services/gcm/gcm_utils.h"
|
| #include "chrome/browser/signin/profile_identity_provider.h"
|
| #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
|
| #include "chrome/browser/signin/signin_manager_factory.h"
|
| +#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
|
| #include "chrome/common/chrome_constants.h"
|
| -#include "chrome/common/pref_names.h"
|
| #include "components/gcm_driver/gcm_client_factory.h"
|
| -#include "components/gcm_driver/gcm_driver.h"
|
| -#include "components/pref_registry/pref_registry_syncable.h"
|
| +#include "components/gcm_driver/gcm_driver_desktop.h"
|
| #include "components/signin/core/browser/signin_manager.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "google_apis/gaia/identity_provider.h"
|
| #include "net/url_request/url_request_context_getter.h"
|
| -
|
| -#if !defined(OS_ANDROID)
|
| -#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
|
| #endif
|
|
|
| namespace gcm {
|
| @@ -74,20 +76,18 @@ GCMProfileService::GCMProfileService(
|
| : profile_(profile) {
|
| DCHECK(!profile->IsOffTheRecord());
|
|
|
| +#if defined(OS_ANDROID)
|
| + driver_.reset(new GCMDriverAndroid());
|
| +#else
|
| + LoginUIService* login_ui_service =
|
| + LoginUIServiceFactory::GetForProfile(profile_);
|
| scoped_refptr<base::SequencedWorkerPool> worker_pool(
|
| content::BrowserThread::GetBlockingPool());
|
| scoped_refptr<base::SequencedTaskRunner> blocking_task_runner(
|
| worker_pool->GetSequencedTaskRunnerWithShutdownBehavior(
|
| worker_pool->GetSequenceToken(),
|
| base::SequencedWorkerPool::SKIP_ON_SHUTDOWN));
|
| -
|
| -#if defined(OS_ANDROID)
|
| - LoginUIService* login_ui_service = NULL;
|
| -#else
|
| - LoginUIService* login_ui_service =
|
| - LoginUIServiceFactory::GetForProfile(profile_);
|
| -#endif
|
| - driver_.reset(new GCMDriver(
|
| + driver_.reset(new GCMDriverDesktop(
|
| gcm_client_factory.Pass(),
|
| scoped_ptr<IdentityProvider>(new ProfileIdentityProvider(
|
| SigninManagerFactory::GetForProfile(profile_),
|
| @@ -101,6 +101,7 @@ GCMProfileService::GCMProfileService(
|
| content::BrowserThread::GetMessageLoopProxyForThread(
|
| content::BrowserThread::IO),
|
| blocking_task_runner));
|
| +#endif
|
| }
|
|
|
| GCMProfileService::GCMProfileService() : profile_(NULL) {
|
|
|