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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 void GetPropertiesCallback( | 52 void GetPropertiesCallback( |
53 const network_handler::DictionaryResultCallback& callback, | 53 const network_handler::DictionaryResultCallback& callback, |
54 const network_handler::ErrorCallback& error_callback, | 54 const network_handler::ErrorCallback& error_callback, |
55 const std::string& service_path, | 55 const std::string& service_path, |
56 DBusMethodCallStatus call_status, | 56 DBusMethodCallStatus call_status, |
57 const base::DictionaryValue& properties) { | 57 const base::DictionaryValue& properties) { |
58 // Get the correct name from WifiHex if necessary. | 58 // Get the correct name from WifiHex if necessary. |
59 scoped_ptr<base::DictionaryValue> properties_copy(properties.DeepCopy()); | 59 scoped_ptr<base::DictionaryValue> properties_copy(properties.DeepCopy()); |
60 std::string name = NetworkState::GetNameFromProperties(properties); | 60 std::string name = NetworkState::GetNameFromProperties( |
| 61 service_path, properties); |
61 if (!name.empty()) { | 62 if (!name.empty()) { |
62 properties_copy->SetStringWithoutPathExpansion( | 63 properties_copy->SetStringWithoutPathExpansion( |
63 flimflam::kNameProperty, name); | 64 flimflam::kNameProperty, name); |
64 } | 65 } |
65 network_handler::GetPropertiesCallback( | 66 network_handler::GetPropertiesCallback( |
66 callback, error_callback, service_path, call_status, | 67 callback, error_callback, service_path, call_status, |
67 *properties_copy.get()); | 68 *properties_copy.get()); |
68 } | 69 } |
69 | 70 |
70 void SetNetworkProfileErrorCallback( | 71 void SetNetworkProfileErrorCallback( |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 441 |
441 // static | 442 // static |
442 NetworkConfigurationHandler* NetworkConfigurationHandler::InitializeForTest( | 443 NetworkConfigurationHandler* NetworkConfigurationHandler::InitializeForTest( |
443 NetworkStateHandler* network_state_handler) { | 444 NetworkStateHandler* network_state_handler) { |
444 NetworkConfigurationHandler* handler = new NetworkConfigurationHandler(); | 445 NetworkConfigurationHandler* handler = new NetworkConfigurationHandler(); |
445 handler->Init(network_state_handler); | 446 handler->Init(network_state_handler); |
446 return handler; | 447 return handler; |
447 } | 448 } |
448 | 449 |
449 } // namespace chromeos | 450 } // namespace chromeos |
OLD | NEW |