Expose the NSArrayToListValue converter.
This commit is contained in:
parent
10dcb10898
commit
aa1b8cd74b
2 changed files with 3 additions and 5 deletions
|
@ -10,7 +10,7 @@
|
||||||
#include "base/memory/scoped_ptr.h"
|
#include "base/memory/scoped_ptr.h"
|
||||||
|
|
||||||
namespace base {
|
namespace base {
|
||||||
class Value;
|
class ListValue;
|
||||||
class DictionaryValue;
|
class DictionaryValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value);
|
||||||
std::unique_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
|
std::unique_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
|
||||||
NSDictionary* dict);
|
NSDictionary* dict);
|
||||||
|
|
||||||
|
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr);
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
||||||
#endif // ATOM_BROWSER_MAC_DICT_UTIL_H_
|
#endif // ATOM_BROWSER_MAC_DICT_UTIL_H_
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr) {
|
std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr) {
|
||||||
if (!arr)
|
if (!arr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -51,8 +49,6 @@ std::unique_ptr<base::ListValue> NSArrayToListValue(NSArray* arr) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value) {
|
NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value) {
|
||||||
std::string json;
|
std::string json;
|
||||||
if (!base::JSONWriter::Write(value, &json))
|
if (!base::JSONWriter::Write(value, &json))
|
||||||
|
|
Loading…
Add table
Reference in a new issue