|
@@ -87,18 +87,17 @@ std::unique_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
|
|
|
|
|
|
id value = [dict objectForKey:key];
|
|
|
if ([value isKindOfClass:[NSString class]]) {
|
|
|
- result->SetStringWithoutPathExpansion(
|
|
|
- str_key, base::SysNSStringToUTF8(value));
|
|
|
+ result->SetKey(str_key, base::Value(base::SysNSStringToUTF8(value)));
|
|
|
} else if ([value isKindOfClass:[NSNumber class]]) {
|
|
|
const char* objc_type = [value objCType];
|
|
|
if (strcmp(objc_type, @encode(BOOL)) == 0 ||
|
|
|
strcmp(objc_type, @encode(char)) == 0)
|
|
|
- result->SetBooleanWithoutPathExpansion(str_key, [value boolValue]);
|
|
|
+ result->SetKey(str_key, base::Value([value boolValue]));
|
|
|
else if (strcmp(objc_type, @encode(double)) == 0 ||
|
|
|
strcmp(objc_type, @encode(float)) == 0)
|
|
|
- result->SetDoubleWithoutPathExpansion(str_key, [value doubleValue]);
|
|
|
+ result->SetKey(str_key, base::Value([value doubleValue]));
|
|
|
else
|
|
|
- result->SetIntegerWithoutPathExpansion(str_key, [value intValue]);
|
|
|
+ result->SetKey(str_key, base::Value([value intValue]));
|
|
|
} else if ([value isKindOfClass:[NSArray class]]) {
|
|
|
std::unique_ptr<base::ListValue> sub_arr = NSArrayToListValue(value);
|
|
|
if (sub_arr)
|
|
@@ -115,9 +114,8 @@ std::unique_ptr<base::DictionaryValue> NSDictionaryToDictionaryValue(
|
|
|
result->SetWithoutPathExpansion(str_key,
|
|
|
base::MakeUnique<base::Value>());
|
|
|
} else {
|
|
|
- result->SetStringWithoutPathExpansion(
|
|
|
- str_key,
|
|
|
- base::SysNSStringToUTF8([value description]));
|
|
|
+ result->SetKey(str_key,
|
|
|
+ base::Value(base::SysNSStringToUTF8([value description])));
|
|
|
}
|
|
|
}
|
|
|
|