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

Unified Diff: chrome/browser/spellchecker/feedback_sender.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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: chrome/browser/spellchecker/feedback_sender.cc
diff --git a/chrome/browser/spellchecker/feedback_sender.cc b/chrome/browser/spellchecker/feedback_sender.cc
index aa2eb756bee816d8e5099b9205878acac8c8b26d..879358d575b6226396b0cb5257fd0ee08c26cc5c 100644
--- a/chrome/browser/spellchecker/feedback_sender.cc
+++ b/chrome/browser/spellchecker/feedback_sender.cc
@@ -31,6 +31,7 @@
#include <algorithm>
#include <iterator>
+#include <utility>
#include "base/command_line.h"
#include "base/hash.h"
@@ -134,7 +135,7 @@ std::unique_ptr<base::ListValue> BuildSuggestionInfo(
base::Uint64ToString(BuildAnonymousHash(salt, suggestion)));
}
misspelling->Set("userSuggestionId", suggestion_list.release());
- list->Append(misspelling.release());
+ list->Append(std::move(misspelling));
}
return list;
}

Powered by Google App Engine
This is Rietveld 408576698