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

Unified Diff: extensions/browser/api/serial/serial_apitest.cc

Issue 2058233002: Rewrite simple uses of base::ListValue::Append() taking a raw pointer var. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: less comments more ownership 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
« no previous file with comments | « dbus/values_util_unittest.cc ('k') | extensions/browser/api/web_request/upload_data_presenter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/serial/serial_apitest.cc
diff --git a/extensions/browser/api/serial/serial_apitest.cc b/extensions/browser/api/serial/serial_apitest.cc
index 0e1ec67916268bfc5b58ee000b127388dd8ef7a0..14fbabbd832071a7374667f181fcb56950a6c2e6 100644
--- a/extensions/browser/api/serial/serial_apitest.cc
+++ b/extensions/browser/api/serial/serial_apitest.cc
@@ -31,12 +31,12 @@ class FakeSerialGetDevicesFunction : public AsyncExtensionFunction {
public:
bool RunAsync() override {
std::unique_ptr<base::ListValue> devices(new base::ListValue());
- base::DictionaryValue* device0 = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> device0(new base::DictionaryValue());
device0->SetString("path", "/dev/fakeserial");
- base::DictionaryValue* device1 = new base::DictionaryValue();
+ std::unique_ptr<base::DictionaryValue> device1(new base::DictionaryValue());
device1->SetString("path", "\\\\COM800\\");
- devices->Append(device0);
- devices->Append(device1);
+ devices->Append(std::move(device0));
+ devices->Append(std::move(device1));
SetResult(std::move(devices));
SendResponse(true);
return true;
« no previous file with comments | « dbus/values_util_unittest.cc ('k') | extensions/browser/api/web_request/upload_data_presenter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698