OLD | NEW |
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_NETWORK_CONFIGURATION_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // profile, and returns the new service_path to |callback| if successful. | 96 // profile, and returns the new service_path to |callback| if successful. |
97 // kProfileProperty must be set in |properties|. See notes on |source| and | 97 // kProfileProperty must be set in |properties|. See notes on |source| and |
98 // callbacks in class description above. This may also be used to update an | 98 // callbacks in class description above. This may also be used to update an |
99 // existing matching configuration, see Shill documentation for | 99 // existing matching configuration, see Shill documentation for |
100 // Manager.ConfigureServiceForProfile. NOTE: Normally | 100 // Manager.ConfigureServiceForProfile. NOTE: Normally |
101 // ManagedNetworkConfigurationHandler should be used to call | 101 // ManagedNetworkConfigurationHandler should be used to call |
102 // CreateConfiguration. This will set GUID if not provided. | 102 // CreateConfiguration. This will set GUID if not provided. |
103 void CreateShillConfiguration( | 103 void CreateShillConfiguration( |
104 const base::DictionaryValue& shill_properties, | 104 const base::DictionaryValue& shill_properties, |
105 NetworkConfigurationObserver::Source source, | 105 NetworkConfigurationObserver::Source source, |
106 const network_handler::StringResultCallback& callback, | 106 const network_handler::ServiceResultCallback& callback, |
107 const network_handler::ErrorCallback& error_callback); | 107 const network_handler::ErrorCallback& error_callback); |
108 | 108 |
109 // Removes the network |service_path| from any profiles that include it. | 109 // Removes the network |service_path| from any profiles that include it. |
110 // See notes on |source| and callbacks in class description above. | 110 // See notes on |source| and callbacks in class description above. |
111 void RemoveConfiguration( | 111 void RemoveConfiguration( |
112 const std::string& service_path, | 112 const std::string& service_path, |
113 NetworkConfigurationObserver::Source source, | 113 NetworkConfigurationObserver::Source source, |
114 const base::Closure& callback, | 114 const base::Closure& callback, |
115 const network_handler::ErrorCallback& error_callback); | 115 const network_handler::ErrorCallback& error_callback); |
116 | 116 |
(...skipping 18 matching lines...) Expand all Loading... |
135 class ProfileEntryDeleter; | 135 class ProfileEntryDeleter; |
136 | 136 |
137 NetworkConfigurationHandler(); | 137 NetworkConfigurationHandler(); |
138 void Init(NetworkStateHandler* network_state_handler, | 138 void Init(NetworkStateHandler* network_state_handler, |
139 NetworkDeviceHandler* network_device_handler); | 139 NetworkDeviceHandler* network_device_handler); |
140 | 140 |
141 void RunCreateNetworkCallback( | 141 void RunCreateNetworkCallback( |
142 const std::string& profile_path, | 142 const std::string& profile_path, |
143 NetworkConfigurationObserver::Source source, | 143 NetworkConfigurationObserver::Source source, |
144 scoped_ptr<base::DictionaryValue> configure_properties, | 144 scoped_ptr<base::DictionaryValue> configure_properties, |
145 const network_handler::StringResultCallback& callback, | 145 const network_handler::ServiceResultCallback& callback, |
146 const dbus::ObjectPath& service_path); | 146 const dbus::ObjectPath& service_path); |
147 | 147 |
148 // Called from ProfileEntryDeleter instances when they complete causing | 148 // Called from ProfileEntryDeleter instances when they complete causing |
149 // this class to delete the instance. | 149 // this class to delete the instance. |
150 void ProfileEntryDeleterCompleted(const std::string& service_path, | 150 void ProfileEntryDeleterCompleted(const std::string& service_path, |
151 const std::string& guid, | 151 const std::string& guid, |
152 NetworkConfigurationObserver::Source source, | 152 NetworkConfigurationObserver::Source source, |
153 bool success); | 153 bool success); |
154 bool PendingProfileEntryDeleterForTest(const std::string& service_path) { | 154 bool PendingProfileEntryDeleterForTest(const std::string& service_path) { |
155 return profile_entry_deleters_.count(service_path); | 155 return profile_entry_deleters_.count(service_path); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 std::map<std::string, ProfileEntryDeleter*> profile_entry_deleters_; | 206 std::map<std::string, ProfileEntryDeleter*> profile_entry_deleters_; |
207 | 207 |
208 base::ObserverList<NetworkConfigurationObserver, true> observers_; | 208 base::ObserverList<NetworkConfigurationObserver, true> observers_; |
209 | 209 |
210 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); | 210 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); |
211 }; | 211 }; |
212 | 212 |
213 } // namespace chromeos | 213 } // namespace chromeos |
214 | 214 |
215 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ | 215 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ |
OLD | NEW |