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

Side by Side Diff: ash/system/network/network_list.cc

Issue 2819383002: [CrOS Tether] Update NetworkState to include tether properties and integrate into NetworkStateHandl… (Closed)
Patch Set: stevenjb@ comment. Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/internet_page/network_summary.js » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/system/network/network_list.h" 5 #include "ash/system/network/network_list.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "ash/strings/grit/ash_strings.h" 9 #include "ash/strings/grit/ash_strings.h"
10 #include "ash/system/network/network_icon.h" 10 #include "ash/system/network/network_icon.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 CHECK(container()); 301 CHECK(container());
302 302
303 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler(); 303 NetworkStateHandler* handler = NetworkHandler::Get()->network_state_handler();
304 304
305 NetworkStateHandler::NetworkStateList network_list; 305 NetworkStateHandler::NetworkStateList network_list;
306 handler->GetVisibleNetworkList(&network_list); 306 handler->GetVisibleNetworkList(&network_list);
307 UpdateNetworks(network_list); 307 UpdateNetworks(network_list);
308 308
309 // Add Tether networks. 309 // Add Tether networks.
310 NetworkStateHandler::NetworkStateList tether_network_list; 310 NetworkStateHandler::NetworkStateList tether_network_list;
311 handler->GetTetherNetworkList(0 /* no limit */, &tether_network_list); 311 handler->GetVisibleNetworkListByType(NetworkTypePattern::Tether(),
312 &tether_network_list);
312 for (const auto* tether_network : tether_network_list) { 313 for (const auto* tether_network : tether_network_list) {
313 network_list_.push_back( 314 network_list_.push_back(
314 base::MakeUnique<NetworkInfo>(tether_network->guid())); 315 base::MakeUnique<NetworkInfo>(tether_network->guid()));
315 } 316 }
316 317
317 UpdateNetworkIcons(); 318 UpdateNetworkIcons();
318 OrderNetworks(); 319 OrderNetworks();
319 UpdateNetworkListInternal(); 320 UpdateNetworkListInternal();
320 } 321 }
321 322
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 if (found == last_network_info_map_.end()) { 675 if (found == last_network_info_map_.end()) {
675 // If we cannot find |info| in |last_network_info_map_|, just return true 676 // If we cannot find |info| in |last_network_info_map_|, just return true
676 // since this is a new network so we have nothing to compare. 677 // since this is a new network so we have nothing to compare.
677 return true; 678 return true;
678 } else { 679 } else {
679 return *found->second != info; 680 return *found->second != info;
680 } 681 }
681 } 682 }
682 683
683 } // namespace ash 684 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/internet_page/network_summary.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698