OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shill_property_util.h" | 5 #include "chromeos/network/shill_property_util.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/i18n/icu_encoding_detection.h" | 9 #include "base/i18n/icu_encoding_detection.h" |
10 #include "base/i18n/icu_string_conversions.h" | 10 #include "base/i18n/icu_string_conversions.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 if (!source.GetStringWithoutPathExpansion(key, &string_value) || | 54 if (!source.GetStringWithoutPathExpansion(key, &string_value) || |
55 string_value.empty()) { | 55 string_value.empty()) { |
56 return false; | 56 return false; |
57 } | 57 } |
58 dest->SetStringWithoutPathExpansion(key, string_value); | 58 dest->SetStringWithoutPathExpansion(key, string_value); |
59 return true; | 59 return true; |
60 } | 60 } |
61 | 61 |
62 } // namespace | 62 } // namespace |
63 | 63 |
64 void SetSSID(const std::string ssid, base::DictionaryValue* properties) { | 64 void SetSSID(const std::string& ssid, base::DictionaryValue* properties) { |
65 std::string hex_ssid = base::HexEncode(ssid.c_str(), ssid.size()); | 65 std::string hex_ssid = base::HexEncode(ssid.c_str(), ssid.size()); |
66 properties->SetStringWithoutPathExpansion(shill::kWifiHexSsid, hex_ssid); | 66 properties->SetStringWithoutPathExpansion(shill::kWifiHexSsid, hex_ssid); |
67 } | 67 } |
68 | 68 |
69 std::string GetSSIDFromProperties(const base::DictionaryValue& properties, | 69 std::string GetSSIDFromProperties(const base::DictionaryValue& properties, |
70 bool verbose_logging, | 70 bool verbose_logging, |
71 bool* unknown_encoding) { | 71 bool* unknown_encoding) { |
72 if (unknown_encoding) | 72 if (unknown_encoding) |
73 *unknown_encoding = false; | 73 *unknown_encoding = false; |
74 | 74 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 LOG(WARNING) | 372 LOG(WARNING) |
373 << "Provider name and country not defined, using code instead: " | 373 << "Provider name and country not defined, using code instead: " |
374 << *home_provider_id; | 374 << *home_provider_id; |
375 } | 375 } |
376 return true; | 376 return true; |
377 } | 377 } |
378 | 378 |
379 } // namespace shill_property_util | 379 } // namespace shill_property_util |
380 | 380 |
381 } // namespace chromeos | 381 } // namespace chromeos |
OLD | NEW |