Index: chrome/test/base/chrome_render_view_host_test_harness.cc |
diff --git a/chrome/test/base/chrome_render_view_host_test_harness.cc b/chrome/test/base/chrome_render_view_host_test_harness.cc |
index ca3dce92ad3fd89f4fdacd96c262b0411835c261..098403e2a0ae9c2b6f4f8aa5428ec496718db845 100644 |
--- a/chrome/test/base/chrome_render_view_host_test_harness.cc |
+++ b/chrome/test/base/chrome_render_view_host_test_harness.cc |
@@ -22,31 +22,36 @@ |
using content::RenderViewHostTester; |
using content::RenderViewHostTestHarness; |
-ChromeRenderViewHostTestHarness::ChromeRenderViewHostTestHarness() { |
-} |
- |
-ChromeRenderViewHostTestHarness::~ChromeRenderViewHostTestHarness() { |
-} |
+namespace { |
-TestingProfile* ChromeRenderViewHostTestHarness::profile() { |
- return static_cast<TestingProfile*>(browser_context()); |
-} |
- |
-static KeyedService* BuildSigninManagerFake(content::BrowserContext* context) { |
+scoped_ptr<KeyedService> BuildSigninManagerFake( |
+ content::BrowserContext* context) { |
Profile* profile = static_cast<Profile*>(context); |
#if defined (OS_CHROMEOS) |
- SigninManagerBase* signin = new SigninManagerBase( |
+ scoped_ptr<SigninManagerBase> signin(new SigninManagerBase( |
ChromeSigninClientFactory::GetInstance()->GetForProfile(profile), |
- AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile)); |
+ AccountTrackerServiceFactory::GetInstance()->GetForProfile(profile))); |
signin->Initialize(NULL); |
- return signin; |
+ return signin.Pass(); |
#else |
- FakeSigninManager* manager = new FakeSigninManager(profile); |
+ scoped_ptr<FakeSigninManager> manager(new FakeSigninManager(profile)); |
manager->Initialize(g_browser_process->local_state()); |
- return manager; |
+ return manager.Pass(); |
#endif |
} |
+} // namespace |
+ |
+ChromeRenderViewHostTestHarness::ChromeRenderViewHostTestHarness() { |
+} |
+ |
+ChromeRenderViewHostTestHarness::~ChromeRenderViewHostTestHarness() { |
+} |
+ |
+TestingProfile* ChromeRenderViewHostTestHarness::profile() { |
+ return static_cast<TestingProfile*>(browser_context()); |
+} |
+ |
void ChromeRenderViewHostTestHarness::TearDown() { |
RenderViewHostTestHarness::TearDown(); |
#if defined(USE_ASH) |