summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 01:56:19 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-07 01:56:19 +0000
commite6e6ba4925feed48fbbd0568b07d8ccb6569eeee (patch)
treefc2fc1bc4d4a56fb413709a977b6ba42ab27af46 /chrome/browser/sessions
parentdaefca3e87d6d36f0e6a58e3b0ff60917f285acb (diff)
downloadchromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.zip
chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.tar.gz
chromium_src-e6e6ba4925feed48fbbd0568b07d8ccb6569eeee.tar.bz2
Ninth patch in making destructors of refcounted objects private.
BUG=26749 Review URL: http://codereview.chromium.org/372013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r--chrome/browser/sessions/base_session_service.h10
-rw-r--r--chrome/browser/sessions/session_backend.h4
-rw-r--r--chrome/browser/sessions/session_service.cc2
-rw-r--r--chrome/browser/sessions/session_service.h4
-rw-r--r--chrome/browser/sessions/tab_restore_service.h4
5 files changed, 17 insertions, 7 deletions
diff --git a/chrome/browser/sessions/base_session_service.h b/chrome/browser/sessions/base_session_service.h
index 6e05094..ae4cbce 100644
--- a/chrome/browser/sessions/base_session_service.h
+++ b/chrome/browser/sessions/base_session_service.h
@@ -46,8 +46,6 @@ class BaseSessionService : public CancelableRequestProvider,
Profile* profile,
const FilePath& path);
- virtual ~BaseSessionService();
-
Profile* profile() const { return profile_; }
// Deletes the last session.
@@ -66,16 +64,22 @@ class BaseSessionService : public CancelableRequestProvider,
explicit InternalGetCommandsRequest(CallbackType* callback)
: CancelableRequest<InternalGetCommandsCallback>(callback) {
}
- virtual ~InternalGetCommandsRequest();
// The commands. The backend fills this in for us.
std::vector<SessionCommand*> commands;
+ protected:
+ virtual ~InternalGetCommandsRequest();
+
private:
DISALLOW_COPY_AND_ASSIGN(InternalGetCommandsRequest);
};
protected:
+ friend class base::RefCountedThreadSafe<BaseSessionService>;
+
+ virtual ~BaseSessionService();
+
// Returns the backend.
SessionBackend* backend() const { return backend_; }
diff --git a/chrome/browser/sessions/session_backend.h b/chrome/browser/sessions/session_backend.h
index bfd446f..2ac9a97 100644
--- a/chrome/browser/sessions/session_backend.h
+++ b/chrome/browser/sessions/session_backend.h
@@ -81,6 +81,10 @@ class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> {
void MoveCurrentSessionToLastSession();
private:
+ friend class base::RefCountedThreadSafe<SessionBackend>;
+
+ ~SessionBackend() {}
+
// If current_session_file_ is open, it is truncated so that it is essentially
// empty (only contains the header). If current_session_file_ isn't open, it
// is is opened and the header is written to it. After this
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 8b2575d..a4247c0 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -77,6 +77,8 @@ class InternalLastSessionRequest
scoped_ptr<SessionService::LastSessionCallback> real_callback;
private:
+ ~InternalLastSessionRequest() {}
+
DISALLOW_COPY_AND_ASSIGN(InternalLastSessionRequest);
};
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
index 98276fe..a687125 100644
--- a/chrome/browser/sessions/session_service.h
+++ b/chrome/browser/sessions/session_service.h
@@ -52,8 +52,6 @@ class SessionService : public BaseSessionService,
// For testing.
explicit SessionService(const FilePath& save_path);
- virtual ~SessionService();
-
// Resets the contents of the file from the current state of all open
// browsers whose profile matches our profile.
void ResetFromCurrentBrowsers();
@@ -155,6 +153,8 @@ class SessionService : public BaseSessionService,
typedef std::map<SessionID::id_type,SessionTab*> IdToSessionTab;
typedef std::map<SessionID::id_type,SessionWindow*> IdToSessionWindow;
+ virtual ~SessionService();
+
// These types mirror Browser::Type, but are re-defined here because these
// specific enumeration _values_ are written into the session database and
// are needed to maintain forward compatibility.
diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h
index 50fc0a7..ba351ab 100644
--- a/chrome/browser/sessions/tab_restore_service.h
+++ b/chrome/browser/sessions/tab_restore_service.h
@@ -124,8 +124,6 @@ class TabRestoreService : public BaseSessionService {
explicit TabRestoreService(Profile* profile,
TimeFactory* time_factory_ = NULL);
- virtual ~TabRestoreService();
-
// Adds/removes an observer. TabRestoreService does not take ownership of
// the observer.
void AddObserver(Observer* observer);
@@ -193,6 +191,8 @@ class TabRestoreService : public BaseSessionService {
LOADED_LAST_SESSION = 1 << 4
};
+ virtual ~TabRestoreService();
+
// Populates the tab's navigations from the NavigationController, and its
// browser_id and tabstrip_index from the browser.
void PopulateTab(Tab* tab,