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

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

Issue 267433005: Provide IPConfigs in networkingPrivate.GetProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + Elim DHCP ONC types Created 6 years, 7 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 | Annotate | Revision Log
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_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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class CHROMEOS_EXPORT NetworkConfigurationHandler 52 class CHROMEOS_EXPORT NetworkConfigurationHandler
53 : public base::SupportsWeakPtr<NetworkConfigurationHandler> { 53 : public base::SupportsWeakPtr<NetworkConfigurationHandler> {
54 public: 54 public:
55 ~NetworkConfigurationHandler(); 55 ~NetworkConfigurationHandler();
56 56
57 // Gets the properties of the network with id |service_path|. See note on 57 // Gets the properties of the network with id |service_path|. See note on
58 // |callback| and |error_callback|, in class description above. 58 // |callback| and |error_callback|, in class description above.
59 void GetProperties( 59 void GetProperties(
60 const std::string& service_path, 60 const std::string& service_path,
61 const network_handler::DictionaryResultCallback& callback, 61 const network_handler::DictionaryResultCallback& callback,
62 const network_handler::ErrorCallback& error_callback) const; 62 const network_handler::ErrorCallback& error_callback);
63 63
64 // Sets the properties of the network with id |service_path|. This means the 64 // Sets the properties of the network with id |service_path|. This means the
65 // given properties will be merged with the existing settings, and it won't 65 // given properties will be merged with the existing settings, and it won't
66 // clear any existing properties. See note on |callback| and |error_callback|, 66 // clear any existing properties. See note on |callback| and |error_callback|,
67 // in class description above. 67 // in class description above.
68 void SetProperties( 68 void SetProperties(
69 const std::string& service_path, 69 const std::string& service_path,
70 const base::DictionaryValue& properties, 70 const base::DictionaryValue& properties,
71 const base::Closure& callback, 71 const base::Closure& callback,
72 const network_handler::ErrorCallback& error_callback); 72 const network_handler::ErrorCallback& error_callback);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const network_handler::StringResultCallback& callback, 125 const network_handler::StringResultCallback& callback,
126 const dbus::ObjectPath& service_path); 126 const dbus::ObjectPath& service_path);
127 127
128 // Called from ProfileEntryDeleter instances when they complete causing 128 // Called from ProfileEntryDeleter instances when they complete causing
129 // this class to delete the instance. 129 // this class to delete the instance.
130 void ProfileEntryDeleterCompleted(const std::string& service_path); 130 void ProfileEntryDeleterCompleted(const std::string& service_path);
131 bool PendingProfileEntryDeleterForTest(const std::string& service_path) { 131 bool PendingProfileEntryDeleterForTest(const std::string& service_path) {
132 return profile_entry_deleters_.count(service_path); 132 return profile_entry_deleters_.count(service_path);
133 } 133 }
134 134
135 // Copy the properties, fix Name, and add IPConfig properties, then invoke
136 // |callback| on success or |error_callback| on failure.
137 void GetPropertiesCallback(
138 const network_handler::DictionaryResultCallback& callback,
139 const network_handler::ErrorCallback& error_callback,
140 const std::string& service_path,
141 DBusMethodCallStatus call_status,
142 const base::DictionaryValue& properties);
143
135 // Invoke the callback and inform NetworkStateHandler to request an update 144 // Invoke the callback and inform NetworkStateHandler to request an update
136 // for the service after setting properties. 145 // for the service after setting properties.
137 void SetPropertiesSuccessCallback(const std::string& service_path, 146 void SetPropertiesSuccessCallback(const std::string& service_path,
138 const base::Closure& callback); 147 const base::Closure& callback);
139 void SetPropertiesErrorCallback( 148 void SetPropertiesErrorCallback(
140 const std::string& service_path, 149 const std::string& service_path,
141 const network_handler::ErrorCallback& error_callback, 150 const network_handler::ErrorCallback& error_callback,
142 const std::string& dbus_error_name, 151 const std::string& dbus_error_name,
143 const std::string& dbus_error_message); 152 const std::string& dbus_error_message);
144 153
(...skipping 15 matching lines...) Expand all
160 169
161 // Map of in-progress deleter instances. Owned by this class. 170 // Map of in-progress deleter instances. Owned by this class.
162 std::map<std::string, ProfileEntryDeleter*> profile_entry_deleters_; 171 std::map<std::string, ProfileEntryDeleter*> profile_entry_deleters_;
163 172
164 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler); 173 DISALLOW_COPY_AND_ASSIGN(NetworkConfigurationHandler);
165 }; 174 };
166 175
167 } // namespace chromeos 176 } // namespace chromeos
168 177
169 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_ 178 #endif // CHROMEOS_NETWORK_NETWORK_CONFIGURATION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698