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 #include "chromeos/network/network_configuration_handler.h" | 5 #include "chromeos/network/network_configuration_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 } | 358 } |
359 | 359 |
360 void NetworkConfigurationHandler::SetNetworkProfile( | 360 void NetworkConfigurationHandler::SetNetworkProfile( |
361 const std::string& service_path, | 361 const std::string& service_path, |
362 const std::string& profile_path, | 362 const std::string& profile_path, |
363 NetworkConfigurationObserver::Source source, | 363 NetworkConfigurationObserver::Source source, |
364 const base::Closure& callback, | 364 const base::Closure& callback, |
365 const network_handler::ErrorCallback& error_callback) { | 365 const network_handler::ErrorCallback& error_callback) { |
366 NET_LOG(USER) << "SetNetworkProfile: " << service_path << ": " | 366 NET_LOG(USER) << "SetNetworkProfile: " << service_path << ": " |
367 << profile_path; | 367 << profile_path; |
368 base::StringValue profile_path_value(profile_path); | 368 base::Value profile_path_value(profile_path); |
369 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty( | 369 DBusThreadManager::Get()->GetShillServiceClient()->SetProperty( |
370 dbus::ObjectPath(service_path), shill::kProfileProperty, | 370 dbus::ObjectPath(service_path), shill::kProfileProperty, |
371 profile_path_value, | 371 profile_path_value, |
372 base::Bind(&NetworkConfigurationHandler::SetNetworkProfileCompleted, | 372 base::Bind(&NetworkConfigurationHandler::SetNetworkProfileCompleted, |
373 weak_ptr_factory_.GetWeakPtr(), service_path, profile_path, | 373 weak_ptr_factory_.GetWeakPtr(), service_path, profile_path, |
374 source, callback), | 374 source, callback), |
375 base::Bind(&SetNetworkProfileErrorCallback, service_path, profile_path, | 375 base::Bind(&SetNetworkProfileErrorCallback, service_path, profile_path, |
376 error_callback)); | 376 error_callback)); |
377 } | 377 } |
378 | 378 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 // static | 593 // static |
594 NetworkConfigurationHandler* NetworkConfigurationHandler::InitializeForTest( | 594 NetworkConfigurationHandler* NetworkConfigurationHandler::InitializeForTest( |
595 NetworkStateHandler* network_state_handler, | 595 NetworkStateHandler* network_state_handler, |
596 NetworkDeviceHandler* network_device_handler) { | 596 NetworkDeviceHandler* network_device_handler) { |
597 NetworkConfigurationHandler* handler = new NetworkConfigurationHandler(); | 597 NetworkConfigurationHandler* handler = new NetworkConfigurationHandler(); |
598 handler->Init(network_state_handler, network_device_handler); | 598 handler->Init(network_state_handler, network_device_handler); |
599 return handler; | 599 return handler; |
600 } | 600 } |
601 | 601 |
602 } // namespace chromeos | 602 } // namespace chromeos |
OLD | NEW |