Index: chrome/browser/extensions/extension_gcm_app_handler_unittest.cc |
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc |
index 59737ca44214de995f700e2dd4a65c885fc3e936..c51beec8a9b8bdad7c0537ae8244695b799427e0 100644 |
--- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc |
+++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc |
@@ -26,8 +26,11 @@ |
#include "chrome/browser/extensions/test_extension_service.h" |
#include "chrome/browser/extensions/test_extension_system.h" |
#include "chrome/browser/profiles/profile.h" |
-#include "chrome/browser/services/gcm/gcm_profile_service.h" |
#include "chrome/browser/services/gcm/gcm_profile_service_factory.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/channel_info.h" |
#include "chrome/common/chrome_paths.h" |
#include "chrome/test/base/testing_profile.h" |
#include "components/gcm_driver/fake_gcm_app_handler.h" |
@@ -35,7 +38,9 @@ |
#include "components/gcm_driver/fake_gcm_client_factory.h" |
#include "components/gcm_driver/gcm_client_factory.h" |
#include "components/gcm_driver/gcm_driver.h" |
+#include "components/gcm_driver/gcm_profile_service.h" |
#include "components/keyed_service/core/keyed_service.h" |
+#include "components/signin/core/browser/signin_manager.h" |
#include "content/public/browser/browser_context.h" |
#include "content/public/browser/browser_thread.h" |
#include "content/public/test/test_browser_thread_bundle.h" |
@@ -190,13 +195,29 @@ class ExtensionGCMAppHandlerTest : public testing::Test { |
public: |
static scoped_ptr<KeyedService> BuildGCMProfileService( |
content::BrowserContext* context) { |
+ Profile* profile = Profile::FromBrowserContext(context); |
+ scoped_refptr<base::SequencedTaskRunner> ui_thread = |
+ content::BrowserThread::GetMessageLoopProxyForThread( |
+ content::BrowserThread::UI); |
+ scoped_refptr<base::SequencedTaskRunner> io_thread = |
+ content::BrowserThread::GetMessageLoopProxyForThread( |
+ content::BrowserThread::IO); |
+ 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)); |
return make_scoped_ptr(new gcm::GCMProfileService( |
- Profile::FromBrowserContext(context), |
- scoped_ptr<gcm::GCMClientFactory>(new gcm::FakeGCMClientFactory( |
- content::BrowserThread::GetMessageLoopProxyForThread( |
- content::BrowserThread::UI), |
- content::BrowserThread::GetMessageLoopProxyForThread( |
- content::BrowserThread::IO))))); |
+ profile->GetPrefs(), profile->GetPath(), profile->GetRequestContext(), |
+ chrome::GetChannel(), |
+ scoped_ptr<ProfileIdentityProvider>(new ProfileIdentityProvider( |
+ SigninManagerFactory::GetForProfile(profile), |
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile), |
+ LoginUIServiceFactory::GetShowLoginPopupCallbackForProfile( |
+ profile))), |
+ make_scoped_ptr(new gcm::FakeGCMClientFactory(ui_thread, io_thread)), |
+ ui_thread, io_thread, blocking_task_runner)); |
} |
ExtensionGCMAppHandlerTest() |