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

Unified Diff: components/sessions/core/session_backend.h

Issue 2600583002: Remove ScopedVector from components/sessions. (Closed)
Patch Set: include Created 3 years, 12 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: components/sessions/core/session_backend.h
diff --git a/components/sessions/core/session_backend.h b/components/sessions/core/session_backend.h
index d53fb8f6547e88b1bfa9b4926d069fa7e83fc13d..765ae5f08d7d4651f2c6063ec32c8527f5519f63 100644
--- a/components/sessions/core/session_backend.h
+++ b/components/sessions/core/session_backend.h
@@ -64,8 +64,9 @@ class SESSIONS_EXPORT SessionBackend
// Appends the specified commands to the current file. If reset_first is
// true the the current file is recreated.
- void AppendCommands(ScopedVector<sessions::SessionCommand> commands,
- bool reset_first);
+ void AppendCommands(
+ std::vector<std::unique_ptr<sessions::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.
@@ -77,7 +78,7 @@ class SESSIONS_EXPORT SessionBackend
//
// On success, the read commands are added to commands.
bool ReadLastSessionCommandsImpl(
- ScopedVector<sessions::SessionCommand>* commands);
+ std::vector<std::unique_ptr<sessions::SessionCommand>>* commands);
// Deletes the file containing the commands for the last session.
void DeleteLastSession();
@@ -92,7 +93,7 @@ class SESSIONS_EXPORT SessionBackend
// On success, the read commands are added to commands. It is up to the
// caller to delete the commands.
bool ReadCurrentSessionCommandsImpl(
- ScopedVector<sessions::SessionCommand>* commands);
+ std::vector<std::unique_ptr<sessions::SessionCommand>>* commands);
private:
friend class base::RefCountedThreadSafe<SessionBackend>;
@@ -114,7 +115,7 @@ class SESSIONS_EXPORT SessionBackend
// Appends the specified commands to the specified file.
bool AppendCommandsToFile(
base::File* file,
- const ScopedVector<sessions::SessionCommand>& commands);
+ const std::vector<std::unique_ptr<sessions::SessionCommand>>& commands);
const sessions::BaseSessionService::SessionType type_;
« no previous file with comments | « components/sessions/core/persistent_tab_restore_service.cc ('k') | components/sessions/core/session_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698