Index: chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc |
diff --git a/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc b/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc |
index 57820cbf8909416ac0f62a89f050d83136240d29..37fb5463def95639d39cee28b611c205afab79ac 100644 |
--- a/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc |
+++ b/chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc |
@@ -13,6 +13,7 @@ |
#include "chrome/browser/signin/signin_promo.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/test/base/testing_profile.h" |
+#include "content/public/test/test_browser_thread_bundle.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace { |
@@ -28,9 +29,6 @@ class OneClickSigninSyncStarterTest : public testing::Test { |
// testing::Test: |
virtual void SetUp() OVERRIDE { |
- testing::Test::SetUp(); |
- profile_.reset(new TestingProfile()); |
- |
// Disable sync to simplify the creation of a OneClickSigninSyncStarter. |
CommandLine::ForCurrentProcess()->AppendSwitch(switches::kDisableSync); |
@@ -38,9 +36,9 @@ class OneClickSigninSyncStarterTest : public testing::Test { |
SigninManagerBase* signin_manager = |
static_cast<FakeSigninManager*>( |
SigninManagerFactory::GetInstance()->SetTestingFactoryAndUse( |
- profile_.get(), |
+ &profile_, |
&OneClickSigninSyncStarterTest::BuildSigninManager)); |
- signin_manager->Initialize(profile_.get(), NULL); |
+ signin_manager->Initialize(&profile_, NULL); |
signin_manager->SetAuthenticatedUsername(kTestingUsername); |
} |
@@ -54,7 +52,7 @@ class OneClickSigninSyncStarterTest : public testing::Test { |
protected: |
void CreateSyncStarter(OneClickSigninSyncStarter::Callback callback) { |
sync_starter_ = new OneClickSigninSyncStarter( |
- profile_.get(), |
+ &profile_, |
NULL, |
std::string(), |
kTestingUsername, |
@@ -67,7 +65,8 @@ class OneClickSigninSyncStarterTest : public testing::Test { |
); |
} |
- scoped_ptr<TestingProfile> profile_; |
+ content::TestBrowserThreadBundle thread_bundle_; |
+ TestingProfile profile_; |
// Deletes itself when SigninFailed() or SigninSuccess() is called. |
OneClickSigninSyncStarter* sync_starter_; |