Index: ui/views/controls/textfield/textfield_model.h |
diff --git a/ui/views/controls/textfield/textfield_model.h b/ui/views/controls/textfield/textfield_model.h |
index c66fe6d068083ee7047790207da919042160e663..58fdca3586d7bae1efce19b9ddd9bc08ba6450a6 100644 |
--- a/ui/views/controls/textfield/textfield_model.h |
+++ b/ui/views/controls/textfield/textfield_model.h |
@@ -265,9 +265,10 @@ class VIEWS_EXPORT TextfieldModel { |
size_t new_text_start); |
void ExecuteAndRecordInsert(const base::string16& new_text, bool mergeable); |
- // Adds or merge |edit| into edit history. Return true if the edit |
- // has been merged and must be deleted after redo. |
- bool AddOrMergeEditHistory(internal::Edit* edit); |
+ // Adds or merge |edit| into edit history. Return ownership of the edit if the |
+ // edit has been merged and must be deleted after redo. |
+ std::unique_ptr<internal::Edit> AddOrMergeEditHistory( |
+ std::unique_ptr<internal::Edit> edit); |
// Modify the text buffer in following way: |
// 1) Delete the string from |delete_from| to |delte_to|. |
@@ -294,7 +295,7 @@ class VIEWS_EXPORT TextfieldModel { |
// The composition range. |
gfx::Range composition_range_; |
- typedef std::list<internal::Edit*> EditHistory; |
+ typedef std::list<std::unique_ptr<internal::Edit>> EditHistory; |
EditHistory edit_history_; |
// An iterator that points to the current edit that can be undone. |