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

Unified Diff: chrome/browser/sync/profile_sync_service_session_unittest.cc

Issue 6901031: Profile shouldn't own Session/TabRestore services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again and hope upload works this time Created 9 years, 8 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
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_session_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_session_unittest.cc b/chrome/browser/sync/profile_sync_service_session_unittest.cc
index 09b48938ad26c056b1648a97aaa59ee9ce272b69..20330b91dee3d63c31f30e1fc23b261c1ee91cbc 100644
--- a/chrome/browser/sync/profile_sync_service_session_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_session_unittest.cc
@@ -11,6 +11,7 @@
#include "base/stl_util-inl.h"
#include "base/task.h"
#include "chrome/browser/sessions/session_service.h"
+#include "chrome/browser/sessions/session_service_factory.h"
#include "chrome/browser/sessions/session_service_test_helper.h"
#include "chrome/browser/sync/abstract_profile_sync_service_test.h"
#include "chrome/browser/sync/engine/syncapi.h"
@@ -95,11 +96,11 @@ class ProfileSyncServiceSessionTest
}
virtual void TearDown() {
- if (profile()->GetSessionService() == service())
+ if (SessionServiceFactory::GetForProfileIfExisting(profile()) == service())
helper_.ReleaseService(); // we transferred ownership to profile
else
helper_.set_service(NULL);
- profile()->set_session_service(NULL);
+ SessionServiceFactory::SetForTestProfile(profile(), NULL);
sync_service_.reset();
profile()->ResetRequestContext();
// Pump messages posted by the sync core thread (which may end up
@@ -115,7 +116,7 @@ class ProfileSyncServiceSessionTest
return false;
sync_service_.reset(new TestProfileSyncService(
&factory_, profile(), "test user", false, task));
- profile()->set_session_service(helper_.service());
+ SessionServiceFactory::SetForTestProfile(profile(), helper_.service());
// Register the session data type.
model_associator_ =
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698