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

Side by Side Diff: extensions/browser/api/socket/socket_api.cc

Issue 730623002: Rename network_prefix to prefix_length in NetworkInterface structure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api/socket/socket_api.h" 5 #include "extensions/browser/api/socket/socket_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 704
705 std::vector<linked_ptr<core_api::socket::NetworkInterface> > create_arg; 705 std::vector<linked_ptr<core_api::socket::NetworkInterface> > create_arg;
706 create_arg.reserve(interface_list.size()); 706 create_arg.reserve(interface_list.size());
707 for (net::NetworkInterfaceList::const_iterator i = interface_list.begin(); 707 for (net::NetworkInterfaceList::const_iterator i = interface_list.begin();
708 i != interface_list.end(); 708 i != interface_list.end();
709 ++i) { 709 ++i) {
710 linked_ptr<core_api::socket::NetworkInterface> info = 710 linked_ptr<core_api::socket::NetworkInterface> info =
711 make_linked_ptr(new core_api::socket::NetworkInterface); 711 make_linked_ptr(new core_api::socket::NetworkInterface);
712 info->name = i->name; 712 info->name = i->name;
713 info->address = net::IPAddressToString(i->address); 713 info->address = net::IPAddressToString(i->address);
714 info->prefix_length = i->network_prefix; 714 info->prefix_length = i->prefix_length;
715 create_arg.push_back(info); 715 create_arg.push_back(info);
716 } 716 }
717 717
718 results_ = core_api::socket::GetNetworkList::Results::Create(create_arg); 718 results_ = core_api::socket::GetNetworkList::Results::Create(create_arg);
719 SendResponse(true); 719 SendResponse(true);
720 } 720 }
721 721
722 SocketJoinGroupFunction::SocketJoinGroupFunction() {} 722 SocketJoinGroupFunction::SocketJoinGroupFunction() {}
723 723
724 SocketJoinGroupFunction::~SocketJoinGroupFunction() {} 724 SocketJoinGroupFunction::~SocketJoinGroupFunction() {}
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 } else { 979 } else {
980 RemoveSocket(params_->socket_id); 980 RemoveSocket(params_->socket_id);
981 error_ = net::ErrorToString(result); 981 error_ = net::ErrorToString(result);
982 } 982 }
983 983
984 results_ = core_api::socket::Secure::Results::Create(result); 984 results_ = core_api::socket::Secure::Results::Create(result);
985 AsyncWorkCompleted(); 985 AsyncWorkCompleted();
986 } 986 }
987 987
988 } // namespace extensions 988 } // namespace extensions
OLDNEW
« no previous file with comments | « content/renderer/p2p/ipc_network_manager.cc ('k') | extensions/browser/api/system_network/system_network_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698