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

Side by Side Diff: chromeos/network/shill_property_handler.h

Issue 1431563005: Handle prohibited technologies in device policy ONC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector>
12 13
13 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
14 #include "chromeos/dbus/dbus_method_call_status.h" 15 #include "chromeos/dbus/dbus_method_call_status.h"
15 #include "chromeos/dbus/shill_property_changed_observer.h" 16 #include "chromeos/dbus/shill_property_changed_observer.h"
16 #include "chromeos/network/managed_state.h" 17 #include "chromeos/network/managed_state.h"
17 #include "chromeos/network/network_handler_callbacks.h" 18 #include "chromeos/network/network_handler_callbacks.h"
18 19
19 namespace base { 20 namespace base {
20 class DictionaryValue; 21 class DictionaryValue;
21 class ListValue; 22 class ListValue;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool IsTechnologyEnabling(const std::string& technology) const; 116 bool IsTechnologyEnabling(const std::string& technology) const;
116 bool IsTechnologyUninitialized(const std::string& technology) const; 117 bool IsTechnologyUninitialized(const std::string& technology) const;
117 118
118 // Asynchronously sets the enabled state for |technology|. 119 // Asynchronously sets the enabled state for |technology|.
119 // Note: Modifies Manager state. Calls |error_callback| on failure. 120 // Note: Modifies Manager state. Calls |error_callback| on failure.
120 void SetTechnologyEnabled( 121 void SetTechnologyEnabled(
121 const std::string& technology, 122 const std::string& technology,
122 bool enabled, 123 bool enabled,
123 const network_handler::ErrorCallback& error_callback); 124 const network_handler::ErrorCallback& error_callback);
124 125
126 // Asynchronously sets the prohibited state for every network technology
127 // listed in |technologies|. Note: Modifies Manager state. Calls
128 // |error_callback| on failure.
129 void SetProhibitedTechnologies(
130 const std::vector<std::string>& technologies,
131 const network_handler::ErrorCallback& error_callback);
132
125 // Sets the list of devices on which portal check is enabled. 133 // Sets the list of devices on which portal check is enabled.
126 void SetCheckPortalList(const std::string& check_portal_list); 134 void SetCheckPortalList(const std::string& check_portal_list);
127 135
128 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we 136 // Sets the Manager.WakeOnLan property. Note: we do not track this state, we
129 // only set it. 137 // only set it.
130 void SetWakeOnLanEnabled(bool enabled); 138 void SetWakeOnLanEnabled(bool enabled);
131 139
132 // Requests an immediate network scan. 140 // Requests an immediate network scan.
133 void RequestScan() const; 141 void RequestScan() const;
134 142
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 215
208 // Callback for getting the IPConfig property of a network or device. Handled 216 // Callback for getting the IPConfig property of a network or device. Handled
209 // here instead of in NetworkState so that all asynchronous requests are done 217 // here instead of in NetworkState so that all asynchronous requests are done
210 // in a single place (also simplifies NetworkState considerably). 218 // in a single place (also simplifies NetworkState considerably).
211 void GetIPConfigCallback(ManagedState::ManagedType type, 219 void GetIPConfigCallback(ManagedState::ManagedType type,
212 const std::string& path, 220 const std::string& path,
213 const std::string& ip_config_path, 221 const std::string& ip_config_path,
214 DBusMethodCallStatus call_status, 222 DBusMethodCallStatus call_status,
215 const base::DictionaryValue& properties); 223 const base::DictionaryValue& properties);
216 224
225 void SetProhibitedTechnologiesEnforced(bool enforced);
226
217 // Pointer to containing class (owns this) 227 // Pointer to containing class (owns this)
218 Listener* listener_; 228 Listener* listener_;
219 229
220 // Convenience pointer for ShillManagerClient 230 // Convenience pointer for ShillManagerClient
221 ShillManagerClient* shill_manager_; 231 ShillManagerClient* shill_manager_;
222 232
223 // Pending update list for each managed state type 233 // Pending update list for each managed state type
224 TypeRequestMap pending_updates_; 234 TypeRequestMap pending_updates_;
225 235
226 // List of states for which properties have been requested, for each managed 236 // List of states for which properties have been requested, for each managed
227 // state type 237 // state type
228 TypeRequestMap requested_updates_; 238 TypeRequestMap requested_updates_;
229 239
230 // List of network services with Shill property changed observers 240 // List of network services with Shill property changed observers
231 ShillPropertyObserverMap observed_networks_; 241 ShillPropertyObserverMap observed_networks_;
232 242
233 // List of network devices with Shill property changed observers 243 // List of network devices with Shill property changed observers
234 ShillPropertyObserverMap observed_devices_; 244 ShillPropertyObserverMap observed_devices_;
235 245
236 // Lists of available / enabled / uninitialized technologies 246 // Lists of available / enabled / uninitialized technologies
237 std::set<std::string> available_technologies_; 247 std::set<std::string> available_technologies_;
238 std::set<std::string> enabled_technologies_; 248 std::set<std::string> enabled_technologies_;
239 std::set<std::string> enabling_technologies_; 249 std::set<std::string> enabling_technologies_;
250 std::set<std::string> prohibited_technologies_;
240 std::set<std::string> uninitialized_technologies_; 251 std::set<std::string> uninitialized_technologies_;
241 252
242 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler); 253 DISALLOW_COPY_AND_ASSIGN(ShillPropertyHandler);
243 }; 254 };
244 255
245 } // namespace internal 256 } // namespace internal
246 } // namespace chromeos 257 } // namespace chromeos
247 258
248 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_ 259 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_HANDLER_H_
OLDNEW
« no previous file with comments | « chromeos/network/prohibited_technologies_handler_unittest.cc ('k') | chromeos/network/shill_property_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698