| Index: base/mac/foundation_util.mm
|
| diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
| index 6778c983a72c4c79920d7a7a97744182f72fd243..f1d277a9b036d11d6f645da3ba928bcda78d969a 100644
|
| --- a/base/mac/foundation_util.mm
|
| +++ b/base/mac/foundation_util.mm
|
| @@ -217,40 +217,6 @@ TYPE_NAME_FOR_CF_TYPE_DEFN(CFString);
|
|
|
| #undef TYPE_NAME_FOR_CF_TYPE_DEFN
|
|
|
| -std::string GetValueFromDictionaryErrorMessage(
|
| - CFStringRef key, const std::string& expected_type, CFTypeRef value) {
|
| - ScopedCFTypeRef<CFStringRef> actual_type_ref(
|
| - CFCopyTypeIDDescription(CFGetTypeID(value)));
|
| - return "Expected value for key " +
|
| - base::SysCFStringRefToUTF8(key) +
|
| - " to be " +
|
| - expected_type +
|
| - " but it was " +
|
| - base::SysCFStringRefToUTF8(actual_type_ref) +
|
| - " instead";
|
| -}
|
| -
|
| -CFTypeRef GetValueFromDictionary(CFDictionaryRef dict,
|
| - CFStringRef key,
|
| - CFTypeID expected_type) {
|
| - CFTypeRef value = CFDictionaryGetValue(dict, key);
|
| - if (!value)
|
| - return value;
|
| -
|
| - if (CFGetTypeID(value) != expected_type) {
|
| - ScopedCFTypeRef<CFStringRef> expected_type_name(
|
| - CFCopyTypeIDDescription(expected_type));
|
| - std::string expected_type_utf8 =
|
| - base::SysCFStringRefToUTF8(expected_type_name);
|
| - DLOG(WARNING) << GetValueFromDictionaryErrorMessage(key,
|
| - expected_type_utf8,
|
| - value);
|
| - return NULL;
|
| - }
|
| -
|
| - return value;
|
| -}
|
| -
|
| void NSObjectRetain(void* obj) {
|
| id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
|
| [nsobj retain];
|
| @@ -379,6 +345,19 @@ CF_CAST_DEFN(CFString);
|
|
|
| #undef CF_CAST_DEFN
|
|
|
| +std::string GetValueFromDictionaryErrorMessage(
|
| + CFStringRef key, const std::string& expected_type, CFTypeRef value) {
|
| + ScopedCFTypeRef<CFStringRef> actual_type_ref(
|
| + CFCopyTypeIDDescription(CFGetTypeID(value)));
|
| + return "Expected value for key " +
|
| + base::SysCFStringRefToUTF8(key) +
|
| + " to be " +
|
| + expected_type +
|
| + " but it was " +
|
| + base::SysCFStringRefToUTF8(actual_type_ref) +
|
| + " instead";
|
| +}
|
| +
|
| } // namespace mac
|
| } // namespace base
|
|
|
|
|