Index: chrome/browser/sessions/persistent_tab_restore_service_unittest.cc |
diff --git a/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc b/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc |
index fe4a05a1099ad491d1a9b331d38010e2138c53ba..cadb88b41fee58a6bd3164e35bafbdefcce5d9aa 100644 |
--- a/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc |
+++ b/chrome/browser/sessions/persistent_tab_restore_service_unittest.cc |
@@ -146,9 +146,8 @@ class PersistentTabRestoreServiceTest : public ChromeRenderViewHostTestHarness { |
// way of AddWindowWithOneTabToSessionService. If |pinned| is true, the |
// tab is marked as pinned in the session service. |
void CreateSessionServiceWithOneWindow(bool pinned) { |
- // The profile takes ownership of this. |
- SessionService* session_service = new SessionService(profile()); |
- SessionServiceFactory::SetForTestProfile(profile(), session_service); |
+ scoped_ptr<SessionService> session_service(new SessionService(profile())); |
+ SessionServiceFactory::SetForTestProfile(profile(), session_service.Pass()); |
AddWindowWithOneTabToSessionService(pinned); |