Expose the NSArrayToListValue converter.

This commit is contained in:
Charlie Hess 2016-06-01 18:53:49 -07:00
parent 10dcb10898
commit aa1b8cd74b
2 changed files with 3 additions and 5 deletions

View file

@ -10,7 +10,7 @@
#include "base/memory/scoped_ptr.h"
namespace base {
class Value;
class ListValue;
class DictionaryValue;
}
@ -21,6 +21,8 @@ NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value);
std::unique_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
NSDictionary* dict);
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr);
} // namespace atom
#endif // ATOM_BROWSER_MAC_DICT_UTIL_H_

View file

@ -10,8 +10,6 @@
namespace atom {
namespace {
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr) {
if (!arr)
return nullptr;
@ -51,8 +49,6 @@ std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr) {
return result;
}
} // namespace
NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value) {
std::string json;
if (!base::JSONWriter::Write(value, &json))