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

Unified Diff: extensions/browser/api/socket/socket_api.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix Created 3 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: extensions/browser/api/socket/socket_api.cc
diff --git a/extensions/browser/api/socket/socket_api.cc b/extensions/browser/api/socket/socket_api.cc
index cd52dff9fcbb206f8472653cf93df89274976f5a..372a24b00b22bd10d7b6c639c5e28cc913fda095 100644
--- a/extensions/browser/api/socket/socket_api.cc
+++ b/extensions/browser/api/socket/socket_api.cc
@@ -600,7 +600,8 @@ void SocketRecvFromFunction::OnCompleted(int bytes_read,
result->Set(kDataKey, base::Value::CreateWithCopiedBuffer(io_buffer->data(),
bytes_read));
} else {
- result->Set(kDataKey, new base::Value(base::Value::Type::BINARY));
+ result->Set(kDataKey,
+ base::MakeUnique<base::Value>(base::Value::Type::BINARY));
}
result->SetString(kAddressKey, address);
result->SetInteger(kPortKey, port);
« no previous file with comments | « device/geolocation/network_location_request.cc ('k') | extensions/browser/api/storage/settings_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698