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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service.cc

Issue 301973009: Add browser-global GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Addressed comments. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
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 a94b202ab385905e802af924f8974b0b7a5b1680..f173159090a5d82cecd44ea614c529299d1848fb 100644
--- a/chrome/browser/services/gcm/gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service.cc
@@ -21,9 +21,7 @@
#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
#include "chrome/common/chrome_constants.h"
#include "components/gcm_driver/gcm_client_factory.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"
#endif
@@ -51,30 +49,16 @@ GCMProfileService::GCMProfileService(
DCHECK(!profile->IsOffTheRecord());
#if defined(OS_ANDROID)
- driver_.reset(new GCMDriverAndroid());
+ 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));
- driver_.reset(new GCMDriverDesktop(
+ driver_ = CreateGCMDriverDesktop(
gcm_client_factory.Pass(),
scoped_ptr<IdentityProvider>(new ProfileIdentityProvider(
SigninManagerFactory::GetForProfile(profile_),
ProfileOAuth2TokenServiceFactory::GetForProfile(profile_),
- login_ui_service)),
- GetChromeBuildInfo(),
+ LoginUIServiceFactory::GetForProfile(profile_))),
profile_->GetPath().Append(chrome::kGCMStoreDirname),
- profile_->GetRequestContext(),
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::UI),
- content::BrowserThread::GetMessageLoopProxyForThread(
- content::BrowserThread::IO),
- blocking_task_runner));
+ profile_->GetRequestContext());
#endif
}

Powered by Google App Engine
This is Rietveld 408576698