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

Unified Diff: chrome/browser/sessions/session_backend.h

Issue 685133004: Handling |SessionCommand|s as scoped_ptr's (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Created 6 years, 2 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
Index: chrome/browser/sessions/session_backend.h
diff --git a/chrome/browser/sessions/session_backend.h b/chrome/browser/sessions/session_backend.h
index 70c52f99d52fddf6c9fb9151b475dbd5ccf4364a..e4fb4e13dbaef94ba2a2f95dc87f2d48bc0d625c 100644
--- a/chrome/browser/sessions/session_backend.h
+++ b/chrome/browser/sessions/session_backend.h
@@ -61,8 +61,7 @@ class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> {
//
// NOTE: this deletes SessionCommands in commands as well as the supplied
// vector.
- void AppendCommands(std::vector<SessionCommand*>* commands,
- bool reset_first);
+ void AppendCommands(ScopedVector<SessionCommand>* commands, bool reset_first);
// Invoked from the service to read the commands that make up the last
// session, invokes ReadLastSessionCommandsImpl to do the work.
@@ -72,9 +71,8 @@ class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> {
// Reads the commands from the last file.
//
- // On success, the read commands are added to commands. It is up to the
- // caller to delete the commands.
- bool ReadLastSessionCommandsImpl(std::vector<SessionCommand*>* commands);
+ // On success, the read commands are added to commands.
+ bool ReadLastSessionCommandsImpl(ScopedVector<SessionCommand>* commands);
// Deletes the file containing the commands for the last session.
void DeleteLastSession();
@@ -88,7 +86,7 @@ class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> {
//
// On success, the read commands are added to commands. It is up to the
// caller to delete the commands.
- bool ReadCurrentSessionCommandsImpl(std::vector<SessionCommand*>* commands);
+ bool ReadCurrentSessionCommandsImpl(ScopedVector<SessionCommand>* commands);
private:
friend class base::RefCountedThreadSafe<SessionBackend>;
@@ -109,7 +107,7 @@ class SessionBackend : public base::RefCountedThreadSafe<SessionBackend> {
// Appends the specified commands to the specified file.
bool AppendCommandsToFile(base::File* file,
- const std::vector<SessionCommand*>& commands);
+ const ScopedVector<SessionCommand>& commands);
const BaseSessionService::SessionType type_;
« no previous file with comments | « chrome/browser/sessions/persistent_tab_restore_service.cc ('k') | chrome/browser/sessions/session_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698