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

Side by Side Diff: ash/common/system/chromeos/network/vpn_list_view.cc

Issue 2489883005: Fix a couple issues with sticky headers (Closed)
Patch Set: rebase Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/common/system/chromeos/network/vpn_list_view.h" 5 #include "ash/common/system/chromeos/network/vpn_list_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 break; 289 break;
290 } 290 }
291 } 291 }
292 } 292 }
293 293
294 // Clear the list. 294 // Clear the list.
295 container()->RemoveAllChildViews(true); 295 container()->RemoveAllChildViews(true);
296 provider_view_key_map_.clear(); 296 provider_view_key_map_.clear();
297 network_view_service_path_map_.clear(); 297 network_view_service_path_map_.clear();
298 list_empty_ = true; 298 list_empty_ = true;
299 container()->SetLayoutManager( 299 if (!UseMd()) {
300 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 300 container()->SetLayoutManager(
301 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
302 }
301 303
302 // Get the list of available VPN networks, in shill's priority order. 304 // Get the list of available VPN networks, in shill's priority order.
303 chromeos::NetworkStateHandler::NetworkStateList networks; 305 chromeos::NetworkStateHandler::NetworkStateList networks;
304 chromeos::NetworkHandler::Get() 306 chromeos::NetworkHandler::Get()
305 ->network_state_handler() 307 ->network_state_handler()
306 ->GetVisibleNetworkListByType(chromeos::NetworkTypePattern::VPN(), 308 ->GetVisibleNetworkListByType(chromeos::NetworkTypePattern::VPN(),
307 &networks); 309 &networks);
308 310
309 if (!networks.empty() && IsConnectedOrConnecting(networks.front())) { 311 if (!networks.empty() && IsConnectedOrConnecting(networks.front())) {
310 // If there is a connected or connecting network, show that network first. 312 // If there is a connected or connecting network, show that network first.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 } 435 }
434 } 436 }
435 437
436 // Add providers without any configured networks, in the order that the 438 // Add providers without any configured networks, in the order that the
437 // providers were returned by the extensions system. 439 // providers were returned by the extensions system.
438 for (const VPNProvider& provider : providers) 440 for (const VPNProvider& provider : providers)
439 AddProviderAndNetworks(provider.key, provider.name, networks); 441 AddProviderAndNetworks(provider.key, provider.name, networks);
440 } 442 }
441 443
442 } // namespace ash 444 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/network_list_md.cc ('k') | ash/common/system/tray/tray_details_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698