summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r--chrome/browser/sessions/tab_restore_service.cc16
-rw-r--r--chrome/browser/sessions/tab_restore_service.h8
2 files changed, 21 insertions, 3 deletions
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc
index 46f1859..720f3ae 100644
--- a/chrome/browser/sessions/tab_restore_service.cc
+++ b/chrome/browser/sessions/tab_restore_service.cc
@@ -24,6 +24,10 @@
using base::Time;
+// TimeFactory-----------------------------------------------------------------
+
+TabRestoreService::TimeFactory::~TimeFactory() {}
+
// Entry ----------------------------------------------------------------------
// ID of the next Entry.
@@ -39,6 +43,8 @@ TabRestoreService::Entry::Entry(Type type)
type(type),
from_last_session(false) {}
+TabRestoreService::Entry::~Entry() {}
+
// TabRestoreService ----------------------------------------------------------
// static
@@ -151,9 +157,15 @@ TabRestoreService::Tab::Tab()
pinned(false) {
}
+TabRestoreService::Tab::~Tab() {
+}
+
TabRestoreService::Window::Window() : Entry(WINDOW), selected_tab_index(-1) {
}
+TabRestoreService::Window::~Window() {
+}
+
TabRestoreService::TabRestoreService(Profile* profile,
TabRestoreService::TimeFactory* time_factory)
: BaseSessionService(BaseSessionService::TAB_RESTORE, profile,
@@ -260,6 +272,10 @@ void TabRestoreService::ClearEntries() {
NotifyTabsChanged();
}
+const TabRestoreService::Entries& TabRestoreService::entries() const {
+ return entries_;
+}
+
void TabRestoreService::RestoreMostRecentEntry(Browser* browser) {
if (entries_.empty())
return;
diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h
index bab699a..6b98d15 100644
--- a/chrome/browser/sessions/tab_restore_service.h
+++ b/chrome/browser/sessions/tab_restore_service.h
@@ -48,7 +48,7 @@ class TabRestoreService : public BaseSessionService {
// Interface used to allow the test to provide a custom time.
class TimeFactory {
public:
- virtual ~TimeFactory() {}
+ virtual ~TimeFactory();
virtual base::Time TimeNow() = 0;
};
@@ -61,7 +61,7 @@ class TabRestoreService : public BaseSessionService {
struct Entry {
Entry();
explicit Entry(Type type);
- virtual ~Entry() {}
+ virtual ~Entry();
// Unique id for this entry. The id is guaranteed to be unique for a
// session.
@@ -82,6 +82,7 @@ class TabRestoreService : public BaseSessionService {
// Represents a previously open tab.
struct Tab : public Entry {
Tab();
+ virtual ~Tab();
bool has_browser() const { return browser_id > 0; }
@@ -108,6 +109,7 @@ class TabRestoreService : public BaseSessionService {
// Represents a previously open window.
struct Window : public Entry {
Window();
+ virtual ~Window();
// The tabs that comprised the window, in order.
std::vector<Tab> tabs;
@@ -147,7 +149,7 @@ class TabRestoreService : public BaseSessionService {
// Returns the entries, ordered with most recently closed entries at the
// front.
- virtual const Entries& entries() const { return entries_; }
+ virtual const Entries& entries() const;
// Restores the most recently closed entry. Does nothing if there are no
// entries to restore. If the most recently restored entry is a tab, it is