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

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

Issue 2510083006: chromeos: Move ownership of ash VPN provider list from chrome into ash (Closed)
Patch Set: Collapse VPNProvider::Key and VPNProvider structs 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 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_ 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_
6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_ 6 #define ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // VPNDelegate::Observer: 56 // VPNDelegate::Observer:
57 void OnVPNProvidersChanged() override; 57 void OnVPNProvidersChanged() override;
58 58
59 // ViewClickListener: 59 // ViewClickListener:
60 void OnViewClicked(views::View* sender) override; 60 void OnViewClicked(views::View* sender) override;
61 61
62 private: 62 private:
63 // Adds a network to the list. 63 // Adds a network to the list.
64 void AddNetwork(const chromeos::NetworkState* network); 64 void AddNetwork(const chromeos::NetworkState* network);
65 65
66 // Adds the VPN provider identified by |key| to the list, along with any 66 // Adds the VPN provider identified by |vpn_provider| to the list, along with
67 // networks that belong to this provider. 67 // any networks that belong to this provider.
68 void AddProviderAndNetworks( 68 void AddProviderAndNetworks(
69 const VPNProvider::Key& key, 69 const VPNProvider& vpn_provider,
70 const std::string& name,
71 const chromeos::NetworkStateHandler::NetworkStateList& networks); 70 const chromeos::NetworkStateHandler::NetworkStateList& networks);
72 71
73 // Adds all available VPN providers and networks to the list. 72 // Adds all available VPN providers and networks to the list.
74 void AddProvidersAndNetworks( 73 void AddProvidersAndNetworks(
75 const chromeos::NetworkStateHandler::NetworkStateList& networks); 74 const chromeos::NetworkStateHandler::NetworkStateList& networks);
76 75
77 NetworkListDelegate* const delegate_; 76 NetworkListDelegate* const delegate_;
78 77
79 // A mapping from each VPN provider's list entry to the provider's key. 78 // A mapping from each VPN provider's list entry to the provider.
80 std::map<const views::View* const, VPNProvider::Key> provider_view_key_map_; 79 std::map<const views::View* const, VPNProvider> provider_view_map_;
81 80
82 // A mapping from each network's list entry to the network's service path. 81 // A mapping from each network's list entry to the network's service path.
83 std::map<const views::View* const, std::string> 82 std::map<const views::View* const, std::string>
84 network_view_service_path_map_; 83 network_view_service_path_map_;
85 84
86 // Whether the list is currently empty (i.e., the next entry added will become 85 // Whether the list is currently empty (i.e., the next entry added will become
87 // the topmost entry). 86 // the topmost entry).
88 bool list_empty_ = true; 87 bool list_empty_ = true;
89 88
90 DISALLOW_COPY_AND_ASSIGN(VPNListView); 89 DISALLOW_COPY_AND_ASSIGN(VPNListView);
91 }; 90 };
92 91
93 } // namespace ash 92 } // namespace ash
94 93
95 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_ 94 #endif // ASH_COMMON_SYSTEM_CHROMEOS_NETWORK_VPN_LIST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698