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

Unified Diff: chrome/browser/browsing_data_remover.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/automation/testing_automation_provider.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_remover.cc
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index 3d335de05df7fff8ddcda5457d39d8cf3644d385..12e1ef3e10db8300ccac55999ce51f05710bf60d 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -23,7 +23,9 @@
#include "chrome/browser/renderer_host/web_cache_manager.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.h"
+#include "chrome/browser/sessions/tab_restore_service_factory.h"
#include "chrome/browser/webdata/web_data_service.h"
#include "chrome/common/url_constants.h"
#include "content/browser/browser_thread.h"
@@ -146,14 +148,16 @@ void BrowsingDataRemover::Remove(int remove_mask) {
// We also delete the list of recently closed tabs. Since these expire,
// they can't be more than a day old, so we can simply clear them all.
- TabRestoreService* tab_service = profile_->GetTabRestoreService();
+ TabRestoreService* tab_service =
+ TabRestoreServiceFactory::GetForProfile(profile_);
if (tab_service) {
tab_service->ClearEntries();
tab_service->DeleteLastSession();
}
// We also delete the last session when we delete the history.
- SessionService* session_service = profile_->GetSessionService();
+ SessionService* session_service =
+ SessionServiceFactory::GetForProfile(profile_);
if (session_service)
session_service->DeleteLastSession();
}
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698