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

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

Issue 2899743002: Remove raw base::DictionaryValue::Set in //extensions (Closed)
Patch Set: Addressed nit 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
« no previous file with comments | « extensions/browser/api/declarative/declarative_api.cc ('k') | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bb3d438f4fde2f2183ba88365c8d7ab7ba95d84e..cd52dff9fcbb206f8472653cf93df89274976f5a 100644
--- a/extensions/browser/api/socket/socket_api.cc
+++ b/extensions/browser/api/socket/socket_api.cc
@@ -522,7 +522,8 @@ void SocketReadFunction::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));
}
SetResult(std::move(result));
« no previous file with comments | « extensions/browser/api/declarative/declarative_api.cc ('k') | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698