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

Unified Diff: chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc

Issue 2290503003: Remove use of stl_util in search_engines. (Closed)
Patch Set: ios for reals Created 4 years, 4 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/ui/search_engines/keyword_editor_controller_unittest.cc
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
index f982d81ccf26e3730a3409db9e0aa022c3af32ff..3d822d19e714f5782de26c2967bf78b83fbd64a2 100644
--- a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/compiler_specific.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
@@ -244,8 +245,9 @@ TEST_F(KeywordEditorControllerTest, MutateTemplateURLService) {
TemplateURLData data;
data.SetShortName(ASCIIToUTF16("b"));
data.SetKeyword(ASCIIToUTF16("a"));
- TemplateURL* turl = new TemplateURL(data);
- util()->model()->Add(turl);
+ std::unique_ptr<TemplateURL> turl_ptr = base::MakeUnique<TemplateURL>(data);
+ TemplateURL* turl = turl_ptr.get();
+ util()->model()->Add(std::move(turl_ptr));
Peter Kasting 2016/08/31 04:12:56 Nit: Just use the old code and add a WrapUnique()
Avi (use Gerrit) 2016/09/01 00:34:26 Done.
// Table model should have updated.
VerifyChangeCount(1, 0, 0, 0);

Powered by Google App Engine
This is Rietveld 408576698