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

Unified Diff: components/undo/undo_manager.cc

Issue 1917673002: Convert //components/[u-z]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix 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/undo/undo_manager.cc
diff --git a/components/undo/undo_manager.cc b/components/undo/undo_manager.cc
index e27e948b671fd57f8adc55eacf6f7fdc9d88de36..59cb8e081f09147cfa6a39c88e1fe5122fed2e4c 100644
--- a/components/undo/undo_manager.cc
+++ b/components/undo/undo_manager.cc
@@ -30,7 +30,7 @@ UndoGroup::UndoGroup()
UndoGroup::~UndoGroup() {
}
-void UndoGroup::AddOperation(scoped_ptr<UndoOperation> operation) {
+void UndoGroup::AddOperation(std::unique_ptr<UndoOperation> operation) {
if (operations_.empty()) {
set_undo_label_id(operation->GetUndoLabelId());
set_redo_label_id(operation->GetRedoLabelId());
@@ -82,7 +82,7 @@ base::string16 UndoManager::GetRedoLabel() const {
: redo_actions_.back()->get_redo_label_id());
}
-void UndoManager::AddUndoOperation(scoped_ptr<UndoOperation> operation) {
+void UndoManager::AddUndoOperation(std::unique_ptr<UndoOperation> operation) {
if (IsUndoTrakingSuspended()) {
RemoveAllOperations();
operation.reset();
@@ -189,7 +189,7 @@ void UndoManager::Undo(bool* performing_indicator,
return;
base::AutoReset<bool> incoming_changes(performing_indicator, true);
- scoped_ptr<UndoGroup> action(active_undo_group->back());
+ std::unique_ptr<UndoGroup> action(active_undo_group->back());
base::AutoReset<UndoGroup*> action_context(&undo_in_progress_action_,
action.get());
active_undo_group->weak_erase(

Powered by Google App Engine
This is Rietveld 408576698