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

Side by Side Diff: extensions/browser/api/system_network/system_network_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
« no previous file with comments | « extensions/browser/api/socket/socket_api.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/system_network/system_network_api.h" 5 #include "extensions/browser/api/system_network/system_network_api.h"
6 6
7 namespace { 7 namespace {
8 const char kNetworkListError[] = "Network lookup failed or unsupported"; 8 const char kNetworkListError[] = "Network lookup failed or unsupported";
9 } // namespace 9 } // namespace
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 std::vector<linked_ptr<core_api::system_network::NetworkInterface> > 63 std::vector<linked_ptr<core_api::system_network::NetworkInterface> >
64 create_arg; 64 create_arg;
65 create_arg.reserve(interface_list.size()); 65 create_arg.reserve(interface_list.size());
66 for (net::NetworkInterfaceList::const_iterator i = interface_list.begin(); 66 for (net::NetworkInterfaceList::const_iterator i = interface_list.begin();
67 i != interface_list.end(); 67 i != interface_list.end();
68 ++i) { 68 ++i) {
69 linked_ptr<core_api::system_network::NetworkInterface> info = 69 linked_ptr<core_api::system_network::NetworkInterface> info =
70 make_linked_ptr(new core_api::system_network::NetworkInterface); 70 make_linked_ptr(new core_api::system_network::NetworkInterface);
71 info->name = i->name; 71 info->name = i->name;
72 info->address = net::IPAddressToString(i->address); 72 info->address = net::IPAddressToString(i->address);
73 info->prefix_length = i->network_prefix; 73 info->prefix_length = i->prefix_length;
74 create_arg.push_back(info); 74 create_arg.push_back(info);
75 } 75 }
76 76
77 results_ = core_api::system_network::GetNetworkInterfaces::Results::Create( 77 results_ = core_api::system_network::GetNetworkInterfaces::Results::Create(
78 create_arg); 78 create_arg);
79 SendResponse(true); 79 SendResponse(true);
80 } 80 }
81 81
82 } // namespace core_api 82 } // namespace core_api
83 } // namespace extensions 83 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/socket/socket_api.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698