Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: base/mac/foundation_util.mm

Issue 2585963003: PKI library Mac trust store integration (Closed)
Patch Set: review changes for comment #19 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 TYPE_NAME_FOR_CF_TYPE_DEFN(CFSet); 206 TYPE_NAME_FOR_CF_TYPE_DEFN(CFSet);
207 TYPE_NAME_FOR_CF_TYPE_DEFN(CFString); 207 TYPE_NAME_FOR_CF_TYPE_DEFN(CFString);
208 TYPE_NAME_FOR_CF_TYPE_DEFN(CFURL); 208 TYPE_NAME_FOR_CF_TYPE_DEFN(CFURL);
209 TYPE_NAME_FOR_CF_TYPE_DEFN(CFUUID); 209 TYPE_NAME_FOR_CF_TYPE_DEFN(CFUUID);
210 210
211 TYPE_NAME_FOR_CF_TYPE_DEFN(CGColor); 211 TYPE_NAME_FOR_CF_TYPE_DEFN(CGColor);
212 212
213 TYPE_NAME_FOR_CF_TYPE_DEFN(CTFont); 213 TYPE_NAME_FOR_CF_TYPE_DEFN(CTFont);
214 TYPE_NAME_FOR_CF_TYPE_DEFN(CTRun); 214 TYPE_NAME_FOR_CF_TYPE_DEFN(CTRun);
215 215
216 #if !defined(OS_IOS)
217 TYPE_NAME_FOR_CF_TYPE_DEFN(SecPolicy);
218 #endif
219
216 #undef TYPE_NAME_FOR_CF_TYPE_DEFN 220 #undef TYPE_NAME_FOR_CF_TYPE_DEFN
217 221
218 void NSObjectRetain(void* obj) { 222 void NSObjectRetain(void* obj) {
219 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); 223 id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
220 [nsobj retain]; 224 [nsobj retain];
221 } 225 }
222 226
223 void NSObjectRelease(void* obj) { 227 void NSObjectRelease(void* obj) {
224 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); 228 id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
225 [nsobj release]; 229 [nsobj release];
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 template<> CTFontRef 405 template<> CTFontRef
402 CFCastStrict<CTFontRef>(const CFTypeRef& cf_val) { 406 CFCastStrict<CTFontRef>(const CFTypeRef& cf_val) {
403 CTFontRef rv = CFCast<CTFontRef>(cf_val); 407 CTFontRef rv = CFCast<CTFontRef>(cf_val);
404 DCHECK(cf_val == NULL || rv); 408 DCHECK(cf_val == NULL || rv);
405 return rv; 409 return rv;
406 } 410 }
407 #endif 411 #endif
408 412
409 #if !defined(OS_IOS) 413 #if !defined(OS_IOS)
410 CF_CAST_DEFN(SecACL); 414 CF_CAST_DEFN(SecACL);
415 CF_CAST_DEFN(SecPolicy);
411 CF_CAST_DEFN(SecTrustedApplication); 416 CF_CAST_DEFN(SecTrustedApplication);
412 #endif 417 #endif
413 418
414 #undef CF_CAST_DEFN 419 #undef CF_CAST_DEFN
415 420
416 std::string GetValueFromDictionaryErrorMessage( 421 std::string GetValueFromDictionaryErrorMessage(
417 CFStringRef key, const std::string& expected_type, CFTypeRef value) { 422 CFStringRef key, const std::string& expected_type, CFTypeRef value) {
418 ScopedCFTypeRef<CFStringRef> actual_type_ref( 423 ScopedCFTypeRef<CFStringRef> actual_type_ref(
419 CFCopyTypeIDDescription(CFGetTypeID(value))); 424 CFCopyTypeIDDescription(CFGetTypeID(value)));
420 return "Expected value for key " + 425 return "Expected value for key " +
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey)); 472 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey));
468 } 473 }
469 o << "Code: " << CFErrorGetCode(err) 474 o << "Code: " << CFErrorGetCode(err)
470 << " Domain: " << CFErrorGetDomain(err) 475 << " Domain: " << CFErrorGetDomain(err)
471 << " Desc: " << desc.get(); 476 << " Desc: " << desc.get();
472 if(errorDesc) { 477 if(errorDesc) {
473 o << "(" << errorDesc << ")"; 478 o << "(" << errorDesc << ")";
474 } 479 }
475 return o; 480 return o;
476 } 481 }
OLDNEW
« no previous file with comments | « base/mac/foundation_util.h ('k') | net/BUILD.gn » ('j') | net/cert/internal/trust_store_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698