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

Unified Diff: components/sessions/core/base_session_service.cc

Issue 1912843002: Convert //components/sessions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/base_session_service.cc
diff --git a/components/sessions/core/base_session_service.cc b/components/sessions/core/base_session_service.cc
index ab1dcc84b779160a922f0afe32f7c891d86a2997..3fb820abe40c0405d0abd7116488dea3c91ad1b2 100644
--- a/components/sessions/core/base_session_service.cc
+++ b/components/sessions/core/base_session_service.cc
@@ -76,7 +76,8 @@ void BaseSessionService::DeleteLastSession() {
base::Bind(&SessionBackend::DeleteLastSession, backend_));
}
-void BaseSessionService::ScheduleCommand(scoped_ptr<SessionCommand> command) {
+void BaseSessionService::ScheduleCommand(
+ std::unique_ptr<SessionCommand> command) {
DCHECK(command);
commands_since_reset_++;
pending_commands_.push_back(command.release());
@@ -84,7 +85,7 @@ void BaseSessionService::ScheduleCommand(scoped_ptr<SessionCommand> command) {
}
void BaseSessionService::AppendRebuildCommand(
- scoped_ptr<SessionCommand> command) {
+ std::unique_ptr<SessionCommand> command) {
DCHECK(command);
pending_commands_.push_back(command.release());
}
@@ -98,8 +99,9 @@ void BaseSessionService::EraseCommand(SessionCommand* old_command) {
pending_commands_.erase(it);
}
-void BaseSessionService::SwapCommand(SessionCommand* old_command,
- scoped_ptr<SessionCommand> new_command) {
+void BaseSessionService::SwapCommand(
+ SessionCommand* old_command,
+ std::unique_ptr<SessionCommand> new_command) {
ScopedVector<SessionCommand>::iterator it =
std::find(pending_commands_.begin(),
pending_commands_.end(),
« no previous file with comments | « components/sessions/core/base_session_service.h ('k') | components/sessions/core/base_session_service_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698