| 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 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ | 5 #ifndef CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ |
| 6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ | 6 #define CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chromeos/chromeos_export.h" | 11 #include "chromeos/chromeos_export.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class DictionaryValue; | 14 class DictionaryValue; |
| 15 class Value; | 15 class Value; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 class NetworkUIData; | 20 class NetworkUIData; |
| 21 | 21 |
| 22 namespace shill_property_util { | 22 namespace shill_property_util { |
| 23 | 23 |
| 24 // Sets the |ssid| in |properties|. | 24 // Sets the |ssid| in |properties|. |
| 25 CHROMEOS_EXPORT void SetSSID(const std::string ssid, | 25 CHROMEOS_EXPORT void SetSSID(const std::string& ssid, |
| 26 base::DictionaryValue* properties); | 26 base::DictionaryValue* properties); |
| 27 | 27 |
| 28 // Returns the SSID from |properties| in UTF-8 encoding. If |verbose_logging| is | 28 // Returns the SSID from |properties| in UTF-8 encoding. If |verbose_logging| is |
| 29 // true, detailed DEBUG log events will be added to the device event log. If | 29 // true, detailed DEBUG log events will be added to the device event log. If |
| 30 // |unknown_encoding| != nullptr, it is set to whether the SSID is of unknown | 30 // |unknown_encoding| != nullptr, it is set to whether the SSID is of unknown |
| 31 // encoding. | 31 // encoding. |
| 32 CHROMEOS_EXPORT std::string GetSSIDFromProperties( | 32 CHROMEOS_EXPORT std::string GetSSIDFromProperties( |
| 33 const base::DictionaryValue& properties, | 33 const base::DictionaryValue& properties, |
| 34 bool verbose_logging, | 34 bool verbose_logging, |
| 35 bool* unknown_encoding); | 35 bool* unknown_encoding); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Parses |value| (which should be a Dictionary). Returns true and sets | 93 // Parses |value| (which should be a Dictionary). Returns true and sets |
| 94 // |home_provider_id| if |value| was succesfully parsed. | 94 // |home_provider_id| if |value| was succesfully parsed. |
| 95 bool GetHomeProviderFromProperty(const base::Value& value, | 95 bool GetHomeProviderFromProperty(const base::Value& value, |
| 96 std::string* home_provider_id); | 96 std::string* home_provider_id); |
| 97 | 97 |
| 98 } // namespace shill_property_util | 98 } // namespace shill_property_util |
| 99 | 99 |
| 100 } // namespace chromeos | 100 } // namespace chromeos |
| 101 | 101 |
| 102 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ | 102 #endif // CHROMEOS_NETWORK_SHILL_PROPERTY_UTIL_H_ |
| OLD | NEW |