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

Unified Diff: chrome/test/testing_profile.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/test/testing_profile.h ('k') | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_profile.cc
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index dbfa6c40953ec4e219996b2676b994f80b0249f6..e42783826163ad68766128477f515ab829213853 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -35,7 +35,8 @@
#include "chrome/browser/profiles/profile_dependency_manager.h"
#include "chrome/browser/search_engines/template_url_fetcher.h"
#include "chrome/browser/search_engines/template_url_model.h"
-#include "chrome/browser/sessions/session_service.h"
+#include "chrome/browser/sessions/session_service_factory.h"
+#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/sync/profile_sync_service_mock.h"
#include "chrome/browser/ui/find_bar/find_bar_state.h"
#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
@@ -187,6 +188,8 @@ TestingProfile::TestingProfile()
&CreateTestDesktopNotificationService);
DesktopNotificationServiceFactory::GetInstance()->ForceAssociationBetween(
this, NULL);
+ SessionServiceFactory::GetInstance()->ForceAssociationBetween(this, NULL);
+ TabRestoreServiceFactory::GetInstance()->ForceAssociationBetween(this, NULL);
}
TestingProfile::~TestingProfile() {
@@ -645,14 +648,6 @@ HostZoomMap* TestingProfile::GetHostZoomMap() {
return NULL;
}
-SessionService* TestingProfile::GetSessionService() {
- return session_service_.get();
-}
-
-bool TestingProfile::HasSessionService() const {
- return (session_service_.get() != NULL);
-}
-
bool TestingProfile::HasProfileSyncService() const {
return (profile_sync_service_.get() != NULL);
}
@@ -685,10 +680,6 @@ base::Time TestingProfile::GetStartTime() const {
return start_time_;
}
-TabRestoreService* TestingProfile::GetTabRestoreService() {
- return NULL;
-}
-
ProtocolHandlerRegistry* TestingProfile::GetProtocolHandlerRegistry() {
return protocol_handler_registry_.get();
}
@@ -697,10 +688,6 @@ SpellCheckHost* TestingProfile::GetSpellCheckHost() {
return NULL;
}
-void TestingProfile::set_session_service(SessionService* session_service) {
- session_service_.reset(session_service);
-}
-
WebKitContext* TestingProfile::GetWebKitContext() {
if (webkit_context_ == NULL) {
webkit_context_ = new WebKitContext(
« no previous file with comments | « chrome/test/testing_profile.h ('k') | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698