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

Unified Diff: chrome/browser/extensions/extension_override_apitest.cc

Issue 2777063003: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Just rebased Created 3 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: chrome/browser/extensions/extension_override_apitest.cc
diff --git a/chrome/browser/extensions/extension_override_apitest.cc b/chrome/browser/extensions/extension_override_apitest.cc
index b1c8ae395904a1a6e870402141403d52478d3c31..21ce6d0513afaebc01b4a9f72310edc2f472ca71 100644
--- a/chrome/browser/extensions/extension_override_apitest.cc
+++ b/chrome/browser/extensions/extension_override_apitest.cc
@@ -4,6 +4,10 @@
#include <stddef.h>
+#include <utility>
+
+#include "base/memory/ptr_util.h"
+#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -274,7 +278,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, ShouldCleanUpDuplicateEntries) {
// a preferences file without corresponding UnloadExtension() calls. This is
// the same as the above test, except for that it is testing the case where
// the file already contains dupes when an extension is loaded.
- base::ListValue* list = new base::ListValue();
+ auto list = base::MakeUnique<base::ListValue>();
for (size_t i = 0; i < 3; ++i) {
std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("entry", "http://www.google.com/");
@@ -285,7 +289,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, ShouldCleanUpDuplicateEntries) {
{
DictionaryPrefUpdate update(browser()->profile()->GetPrefs(),
ExtensionWebUI::kExtensionURLOverrides);
- update.Get()->Set("history", list);
+ update.Get()->Set("history", std::move(list));
}
ASSERT_FALSE(CheckHistoryOverridesContainsNoDupes());

Powered by Google App Engine
This is Rietveld 408576698