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

Unified Diff: chrome/browser/sessions/session_service.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
« no previous file with comments | « chrome/browser/sessions/session_backend_unittest.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.h
diff --git a/chrome/browser/sessions/session_service.h b/chrome/browser/sessions/session_service.h
index 1398b4bc1b097787c4e6e50c2a2aec62041b17a7..44a2ff5c6b06fbf5eb8fb9fb1a8afe386f9e41aa 100644
--- a/chrome/browser/sessions/session_service.h
+++ b/chrome/browser/sessions/session_service.h
@@ -261,7 +261,7 @@ class SessionService : public BaseSessionService,
content::WebContents* tab,
int index_in_window,
bool is_pinned,
- std::vector<SessionCommand*>* commands,
+ ScopedVector<SessionCommand>* commands,
IdToRange* tab_to_available_range);
// Adds commands to create the specified browser, and invokes
@@ -269,7 +269,7 @@ class SessionService : public BaseSessionService,
// any tabs not in the profile we were created with.
void BuildCommandsForBrowser(
Browser* browser,
- std::vector<SessionCommand*>* commands,
+ ScopedVector<SessionCommand>* commands,
IdToRange* tab_to_available_range,
std::set<SessionID::id_type>* windows_to_track);
@@ -278,7 +278,7 @@ class SessionService : public BaseSessionService,
// returns true). All browsers that are tracked are added to windows_to_track
// (as long as it is non-null).
void BuildCommandsFromBrowsers(
- std::vector<SessionCommand*>* commands,
+ ScopedVector<SessionCommand>* commands,
IdToRange* tab_to_available_range,
std::set<SessionID::id_type>* windows_to_track);
@@ -286,9 +286,8 @@ class SessionService : public BaseSessionService,
// of the file are recreated from the state of the browser.
void ScheduleResetCommands();
- // Schedules the specified command. This method takes ownership of the
- // command.
- void ScheduleCommand(SessionCommand* command) override;
+ // Schedules the specified command.
+ void ScheduleCommand(scoped_ptr<SessionCommand> command) override;
// Converts all pending tab/window closes to commands and schedules them.
void CommitPendingCloses();
« no previous file with comments | « chrome/browser/sessions/session_backend_unittest.cc ('k') | chrome/browser/sessions/session_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698