Index: chrome/browser/sessions/session_service.h |
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h |
index 44a2ff5c6b06fbf5eb8fb9fb1a8afe386f9e41aa..b0f8e9631355a06d5394711d513999f99bc48f3a 100644 |
--- a/chrome/browser/sessions/session_service.h |
+++ b/chrome/browser/sessions/session_service.h |
@@ -15,7 +15,7 @@ |
#include "base/task/cancelable_task_tracker.h" |
#include "base/time/time.h" |
#include "chrome/browser/defaults.h" |
-#include "chrome/browser/sessions/base_session_service.h" |
+#include "chrome/browser/sessions/base_session_service_delegate_impl.h" |
#include "chrome/browser/sessions/session_service_commands.h" |
#include "chrome/browser/sessions/session_service_utils.h" |
#include "chrome/browser/ui/browser.h" |
@@ -56,7 +56,7 @@ class WebContents; |
// flushed to |SessionBackend| and written to a file. Every so often |
// |SessionService| rebuilds the contents of the file from the open state of the |
// browser. |
-class SessionService : public BaseSessionService, |
+class SessionService : public BaseSessionServiceDelegateImpl, |
public KeyedService, |
public content::NotificationObserver, |
public chrome::BrowserListObserver { |
@@ -100,6 +100,9 @@ class SessionService : public BaseSessionService, |
// browsers are running. |
void MoveCurrentSessionToLastSession(); |
+ // Deletes the last session. |
+ void DeleteLastSession(); |
+ |
// Associates a tab with a window. |
void SetTabWindow(const SessionID& window_id, |
const SessionID& tab_id); |
@@ -207,9 +210,11 @@ class SessionService : public BaseSessionService, |
const SessionCallback& callback, |
base::CancelableTaskTracker* tracker); |
- // Overridden from BaseSessionService because we want some UMA reporting on |
- // session update activities. |
- void Save() override; |
+ // BaseSessionServiceDelegateImpl: |
+ void OnSavedCommands() override; |
+ |
+ // Unit test accessors. |
+ BaseSessionService* GetBaseSessionServiceForTest(); |
sky
2014/10/31 22:36:17
Same comment about preferring friend here.
Mr4D (OOO till 08-26)
2014/11/01 01:28:24
Done.
|
private: |
// Allow tests to access our innards for testing purposes. |
@@ -229,10 +234,6 @@ class SessionService : public BaseSessionService, |
// Removes unrestorable windows from the previous windows list. |
void RemoveUnusedRestoreWindows(std::vector<SessionWindow*>* window_list); |
- // Returns true if we have scheduled any commands, or any scheduled commands |
- // have been saved. |
- bool processed_any_commands(); |
- |
// Implementation of RestoreIfNecessary. If |browser| is non-null and we need |
// to restore, the tabs are added to it, otherwise a new browser is created. |
bool RestoreIfNecessary(const std::vector<GURL>& urls_to_open, |
@@ -287,7 +288,7 @@ class SessionService : public BaseSessionService, |
void ScheduleResetCommands(); |
// Schedules the specified command. |
- void ScheduleCommand(scoped_ptr<SessionCommand> command) override; |
+ void ScheduleCommand(scoped_ptr<SessionCommand> command); |
// Converts all pending tab/window closes to commands and schedules them. |
void CommitPendingCloses(); |
@@ -330,6 +331,9 @@ class SessionService : public BaseSessionService, |
// The profile. This may be null during testing. |
Profile* profile_; |
+ // The owned BaseSessionService. |
+ scoped_ptr<BaseSessionService> base_session_service_; |
+ |
content::NotificationRegistrar registrar_; |
// Maps from session tab id to the range of navigation entries that has |