summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_remover.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-06 19:30:19 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-06 19:30:19 +0000
commit169627b81ce036a7014476c366b060e050b5ff70 (patch)
tree6231d8cfaa065513b4742d99204b25da4178037a /chrome/browser/browsing_data_remover.cc
parentee824a436efbdeed4ca78efc4dd2aa4976ba43a9 (diff)
downloadchromium_src-169627b81ce036a7014476c366b060e050b5ff70.zip
chromium_src-169627b81ce036a7014476c366b060e050b5ff70.tar.gz
chromium_src-169627b81ce036a7014476c366b060e050b5ff70.tar.bz2
Makes the tab restore service persist closed tabs/windows to disk and
reload them when asked. Sorry for largish looking change. It's made big by refactoring common code between TabRestoreService and SessionService into a common superclass. At the same time I removed some dead code and shuffled the session related classes into a single directory for easier perusal. BUG=384 TEST=close the browser, start the browser and make sure the new tab page shows closed windows/tabs from the previous session. Review URL: http://codereview.chromium.org/13152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_remover.cc')
-rw-r--r--chrome/browser/browsing_data_remover.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/browsing_data_remover.cc b/chrome/browser/browsing_data_remover.cc
index e0cdc68..86f8e98 100644
--- a/chrome/browser/browsing_data_remover.cc
+++ b/chrome/browser/browsing_data_remover.cc
@@ -8,8 +8,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/profile.h"
-#include "chrome/browser/session_service.h"
-#include "chrome/browser/tab_restore_service.h"
+#include "chrome/browser/sessions/session_service.h"
+#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/template_url_model.h"
#include "chrome/browser/user_metrics.h"
#include "chrome/browser/webdata/web_data_service.h"
@@ -77,13 +77,15 @@ 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();
- if (tab_service)
+ 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();
if (session_service)
- session_service->DeleteSession(false); // Last session.
+ session_service->DeleteLastSession();
}
if (remove_mask & REMOVE_DOWNLOADS) {