| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/mac/foundation_util.h" | 5 #include "base/mac/foundation_util.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBag); | 182 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBag); |
| 183 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBoolean); | 183 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBoolean); |
| 184 TYPE_NAME_FOR_CF_TYPE_DEFN(CFData); | 184 TYPE_NAME_FOR_CF_TYPE_DEFN(CFData); |
| 185 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDate); | 185 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDate); |
| 186 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDictionary); | 186 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDictionary); |
| 187 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNull); | 187 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNull); |
| 188 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNumber); | 188 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNumber); |
| 189 TYPE_NAME_FOR_CF_TYPE_DEFN(CFSet); | 189 TYPE_NAME_FOR_CF_TYPE_DEFN(CFSet); |
| 190 TYPE_NAME_FOR_CF_TYPE_DEFN(CFString); | 190 TYPE_NAME_FOR_CF_TYPE_DEFN(CFString); |
| 191 | 191 |
| 192 TYPE_NAME_FOR_CF_TYPE_DEFN(CGColor); |
| 193 |
| 194 TYPE_NAME_FOR_CF_TYPE_DEFN(CTFont); |
| 195 TYPE_NAME_FOR_CF_TYPE_DEFN(CTRun); |
| 196 |
| 192 #undef TYPE_NAME_FOR_CF_TYPE_DEFN | 197 #undef TYPE_NAME_FOR_CF_TYPE_DEFN |
| 193 | 198 |
| 194 void NSObjectRetain(void* obj) { | 199 void NSObjectRetain(void* obj) { |
| 195 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); | 200 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); |
| 196 [nsobj retain]; | 201 [nsobj retain]; |
| 197 } | 202 } |
| 198 | 203 |
| 199 void NSObjectRelease(void* obj) { | 204 void NSObjectRelease(void* obj) { |
| 200 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); | 205 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); |
| 201 [nsobj release]; | 206 [nsobj release]; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 CF_CAST_DEFN(CFBag); | 315 CF_CAST_DEFN(CFBag); |
| 311 CF_CAST_DEFN(CFBoolean); | 316 CF_CAST_DEFN(CFBoolean); |
| 312 CF_CAST_DEFN(CFData); | 317 CF_CAST_DEFN(CFData); |
| 313 CF_CAST_DEFN(CFDate); | 318 CF_CAST_DEFN(CFDate); |
| 314 CF_CAST_DEFN(CFDictionary); | 319 CF_CAST_DEFN(CFDictionary); |
| 315 CF_CAST_DEFN(CFNull); | 320 CF_CAST_DEFN(CFNull); |
| 316 CF_CAST_DEFN(CFNumber); | 321 CF_CAST_DEFN(CFNumber); |
| 317 CF_CAST_DEFN(CFSet); | 322 CF_CAST_DEFN(CFSet); |
| 318 CF_CAST_DEFN(CFString); | 323 CF_CAST_DEFN(CFString); |
| 319 | 324 |
| 325 CF_CAST_DEFN(CGColor); |
| 326 |
| 327 CF_CAST_DEFN(CTFont); |
| 328 CF_CAST_DEFN(CTRun); |
| 329 |
| 320 CF_CAST_DEFN(SecACL); | 330 CF_CAST_DEFN(SecACL); |
| 321 CF_CAST_DEFN(SecTrustedApplication); | 331 CF_CAST_DEFN(SecTrustedApplication); |
| 322 | 332 |
| 323 #undef CF_CAST_DEFN | 333 #undef CF_CAST_DEFN |
| 324 | 334 |
| 325 std::string GetValueFromDictionaryErrorMessage( | 335 std::string GetValueFromDictionaryErrorMessage( |
| 326 CFStringRef key, const std::string& expected_type, CFTypeRef value) { | 336 CFStringRef key, const std::string& expected_type, CFTypeRef value) { |
| 327 ScopedCFTypeRef<CFStringRef> actual_type_ref( | 337 ScopedCFTypeRef<CFStringRef> actual_type_ref( |
| 328 CFCopyTypeIDDescription(CFGetTypeID(value))); | 338 CFCopyTypeIDDescription(CFGetTypeID(value))); |
| 329 return "Expected value for key " + | 339 return "Expected value for key " + |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey)); | 374 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey)); |
| 365 } | 375 } |
| 366 o << "Code: " << CFErrorGetCode(err) | 376 o << "Code: " << CFErrorGetCode(err) |
| 367 << " Domain: " << CFErrorGetDomain(err) | 377 << " Domain: " << CFErrorGetDomain(err) |
| 368 << " Desc: " << desc.get(); | 378 << " Desc: " << desc.get(); |
| 369 if(errorDesc) { | 379 if(errorDesc) { |
| 370 o << "(" << errorDesc << ")"; | 380 o << "(" << errorDesc << ")"; |
| 371 } | 381 } |
| 372 return o; | 382 return o; |
| 373 } | 383 } |
| OLD | NEW |