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

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

Issue 14566009: Add NetworkConnectionHandler class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert Associating Stub change for test Created 7 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 #include "chromeos/network/network_configuration_handler.h" 5 #include "chromeos/network/network_configuration_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 names, 161 names,
162 base::Bind(&ClearPropertiesCallback, 162 base::Bind(&ClearPropertiesCallback,
163 names, 163 names,
164 service_path, 164 service_path,
165 callback, 165 callback,
166 error_callback), 166 error_callback),
167 base::Bind(&network_handler::ShillErrorCallbackFunction, 167 base::Bind(&network_handler::ShillErrorCallbackFunction,
168 kLogModule, service_path, error_callback)); 168 kLogModule, service_path, error_callback));
169 } 169 }
170 170
171 void NetworkConfigurationHandler::Connect(
172 const std::string& service_path,
173 const base::Closure& callback,
174 const network_handler::ErrorCallback& error_callback) const {
175 DBusThreadManager::Get()->GetShillServiceClient()->Connect(
176 dbus::ObjectPath(service_path),
177 callback,
178 base::Bind(&network_handler::ShillErrorCallbackFunction,
179 kLogModule, service_path, error_callback));
180 }
181
182 void NetworkConfigurationHandler::Disconnect(
183 const std::string& service_path,
184 const base::Closure& callback,
185 const network_handler::ErrorCallback& error_callback) const {
186 DBusThreadManager::Get()->GetShillServiceClient()->Disconnect(
187 dbus::ObjectPath(service_path),
188 callback,
189 base::Bind(&network_handler::ShillErrorCallbackFunction,
190 kLogModule, service_path, error_callback));
191 }
192
193 void NetworkConfigurationHandler::CreateConfiguration( 171 void NetworkConfigurationHandler::CreateConfiguration(
194 const base::DictionaryValue& properties, 172 const base::DictionaryValue& properties,
195 const network_handler::StringResultCallback& callback, 173 const network_handler::StringResultCallback& callback,
196 const network_handler::ErrorCallback& error_callback) const { 174 const network_handler::ErrorCallback& error_callback) const {
197 ShillManagerClient* manager = 175 ShillManagerClient* manager =
198 DBusThreadManager::Get()->GetShillManagerClient(); 176 DBusThreadManager::Get()->GetShillManagerClient();
199 177
200 std::string type; 178 std::string type;
201 properties.GetStringWithoutPathExpansion(flimflam::kTypeProperty, &type); 179 properties.GetStringWithoutPathExpansion(flimflam::kTypeProperty, &type);
202 // Shill supports ConfigureServiceForProfile only for network type WiFi. In 180 // Shill supports ConfigureServiceForProfile only for network type WiFi. In
(...skipping 30 matching lines...) Expand all
233 kLogModule, service_path, error_callback)); 211 kLogModule, service_path, error_callback));
234 } 212 }
235 213
236 NetworkConfigurationHandler::NetworkConfigurationHandler() { 214 NetworkConfigurationHandler::NetworkConfigurationHandler() {
237 } 215 }
238 216
239 NetworkConfigurationHandler::~NetworkConfigurationHandler() { 217 NetworkConfigurationHandler::~NetworkConfigurationHandler() {
240 } 218 }
241 219
242 } // namespace chromeos 220 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/network_configuration_handler.h ('k') | chromeos/network/network_configuration_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698