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

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

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.h
diff --git a/components/sessions/core/base_session_service.h b/components/sessions/core/base_session_service.h
index bf389a4ec5759bec0275704df0de3670375e1d14..6511cf0d3acaf88d057e42cd40dd27e96148f692 100644
--- a/components/sessions/core/base_session_service.h
+++ b/components/sessions/core/base_session_service.h
@@ -5,10 +5,11 @@
#ifndef COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_H_
#define COMPONENTS_SESSIONS_CORE_BASE_SESSION_SERVICE_H_
+#include <memory>
+
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "base/task/cancelable_task_tracker.h"
@@ -69,11 +70,11 @@ class SESSIONS_EXPORT BaseSessionService {
// Schedules a command. This adds |command| to pending_commands_ and
// invokes StartSaveTimer to start a timer that invokes Save at a later
// time.
- void ScheduleCommand(scoped_ptr<SessionCommand> command);
+ void ScheduleCommand(std::unique_ptr<SessionCommand> command);
// Appends a command as part of a general rebuild. This will neither count
// against a rebuild, nor will it trigger a save of commands.
- void AppendRebuildCommand(scoped_ptr<SessionCommand> command);
+ void AppendRebuildCommand(std::unique_ptr<SessionCommand> command);
// Erase the |old_command| from the list of commands.
// The passed command will automatically be deleted.
@@ -83,7 +84,7 @@ class SESSIONS_EXPORT BaseSessionService {
// the |old_command|. The |old_command| will be automatically deleted in the
// process.
void SwapCommand(SessionCommand* old_command,
- scoped_ptr<SessionCommand> new_command);
+ std::unique_ptr<SessionCommand> new_command);
// Clears all commands from the list.
void ClearPendingCommands();

Powered by Google App Engine
This is Rietveld 408576698