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

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

Issue 1842953002: [Extensions] Convert APIs to use movable types [13] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/serial/serial_api.cc ('k') | extensions/browser/api/sockets_tcp/sockets_tcp_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 5ca184c15ff194039316f7f285995d0e6c3ffd60..4b1074a0085dd29898f9cf4fe6bfa26364e4dc0f 100644
--- a/extensions/browser/api/socket/socket_api.cc
+++ b/extensions/browser/api/socket/socket_api.cc
@@ -792,17 +792,14 @@ void SocketGetNetworkListFunction::SendResponseOnUIThread(
const net::NetworkInterfaceList& interface_list) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- std::vector<linked_ptr<api::socket::NetworkInterface>> create_arg;
+ std::vector<api::socket::NetworkInterface> create_arg;
create_arg.reserve(interface_list.size());
- for (net::NetworkInterfaceList::const_iterator i = interface_list.begin();
- i != interface_list.end();
- ++i) {
- linked_ptr<api::socket::NetworkInterface> info =
- make_linked_ptr(new api::socket::NetworkInterface);
- info->name = i->name;
- info->address = i->address.ToString();
- info->prefix_length = i->prefix_length;
- create_arg.push_back(info);
+ for (const net::NetworkInterface& interface : interface_list) {
+ api::socket::NetworkInterface info;
+ info.name = interface.name;
+ info.address = interface.address.ToString();
+ info.prefix_length = interface.prefix_length;
+ create_arg.push_back(std::move(info));
}
results_ = api::socket::GetNetworkList::Results::Create(create_arg);
« no previous file with comments | « extensions/browser/api/serial/serial_api.cc ('k') | extensions/browser/api/sockets_tcp/sockets_tcp_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698