diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-17 04:09:06 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-17 04:09:06 +0000 |
commit | df0ca6c858762b101bf424ff6c0522409fa195fc (patch) | |
tree | efa188eee6972e2c0de358f2d19a2348ce6dcb06 /net | |
parent | 73de26a684944782a92f8e6840e1b290c9a424cd (diff) | |
download | chromium_src-df0ca6c858762b101bf424ff6c0522409fa195fc.zip chromium_src-df0ca6c858762b101bf424ff6c0522409fa195fc.tar.gz chromium_src-df0ca6c858762b101bf424ff6c0522409fa195fc.tar.bz2 |
Move scoped_cftyperef from base to base/mac, use the new namespace, and name it
properly (scoped_cftyperef -> ScopedCFTypeRef).
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3855001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62887 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/cert_test_util.cc | 6 | ||||
-rw-r--r-- | net/base/keygen_handler_mac.cc | 8 | ||||
-rw-r--r-- | net/base/network_change_notifier_mac.cc | 9 | ||||
-rw-r--r-- | net/base/network_config_watcher_mac.cc | 3 | ||||
-rw-r--r-- | net/base/network_config_watcher_mac.h | 4 | ||||
-rw-r--r-- | net/base/platform_mime_util_mac.cc | 16 | ||||
-rw-r--r-- | net/base/ssl_config_service_mac.cc | 4 | ||||
-rw-r--r-- | net/base/x509_certificate_mac.cc | 41 | ||||
-rw-r--r-- | net/proxy/proxy_config_service_mac.cc | 4 | ||||
-rw-r--r-- | net/proxy/proxy_resolver_mac.cc | 14 | ||||
-rw-r--r-- | net/socket/ssl_client_socket_mac.cc | 6 |
11 files changed, 61 insertions, 54 deletions
diff --git a/net/base/cert_test_util.cc b/net/base/cert_test_util.cc index 8815cd5..7e8fde0 100644 --- a/net/base/cert_test_util.cc +++ b/net/base/cert_test_util.cc @@ -15,7 +15,7 @@ #include "base/nss_util.h" #elif defined(OS_MACOSX) #include <Security/Security.h> -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #endif #include "base/file_util.h" @@ -104,7 +104,7 @@ X509Certificate* LoadTemporaryRootCert(const FilePath& filename) { static_cast<CFIndex>(rawcert.size())); if (!pem) return NULL; - scoped_cftyperef<CFDataRef> scoped_pem(pem); + base::mac::ScopedCFTypeRef<CFDataRef> scoped_pem(pem); SecExternalFormat input_format = kSecFormatUnknown; SecExternalItemType item_type = kSecItemTypeUnknown; @@ -112,7 +112,7 @@ X509Certificate* LoadTemporaryRootCert(const FilePath& filename) { if (SecKeychainItemImport(pem, NULL, &input_format, &item_type, 0, NULL, NULL, &cert_array)) return NULL; - scoped_cftyperef<CFArrayRef> scoped_cert_array(cert_array); + base::mac::ScopedCFTypeRef<CFArrayRef> scoped_cert_array(cert_array); if (!CFArrayGetCount(cert_array)) return NULL; diff --git a/net/base/keygen_handler_mac.cc b/net/base/keygen_handler_mac.cc index 460fd46..fdad99e 100644 --- a/net/base/keygen_handler_mac.cc +++ b/net/base/keygen_handler_mac.cc @@ -12,7 +12,7 @@ #include "base/crypto/cssm_init.h" #include "base/lock.h" #include "base/logging.h" -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" @@ -111,7 +111,7 @@ std::string KeygenHandler::GenKeyAndSignChallenge() { if (url_.has_host()) { // TODO(davidben): Use something like "Key generated for // example.com", but localize it. - scoped_cftyperef<CFStringRef> label( + base::mac::ScopedCFTypeRef<CFStringRef> label( base::SysUTF8ToCFStringRef(url_.host())); // Create an initial access object to set the SecAccessRef. This // sets a label on the Keychain dialogs. Pass NULL as the second @@ -137,7 +137,7 @@ std::string KeygenHandler::GenKeyAndSignChallenge() { base::LogCSSMError("SecKeychainItemExpor", err); goto failure; } - scoped_cftyperef<CFDataRef> scoped_key_data(key_data); + base::mac::ScopedCFTypeRef<CFDataRef> scoped_key_data(key_data); // Create an ASN.1 encoder. err = SecAsn1CoderCreate(&coder); @@ -232,7 +232,7 @@ static OSStatus CreateRSAKeyPair(int size_in_bits, base::LogCSSMError("SecKeychainCopyDefault", err); return err; } - scoped_cftyperef<SecKeychainRef> scoped_keychain(keychain); + base::mac::ScopedCFTypeRef<SecKeychainRef> scoped_keychain(keychain); { AutoLock locked(base::GetMacSecurityServicesLock()); err = SecKeyCreatePair( diff --git a/net/base/network_change_notifier_mac.cc b/net/base/network_change_notifier_mac.cc index e5b3ce39..7521c90 100644 --- a/net/base/network_change_notifier_mac.cc +++ b/net/base/network_change_notifier_mac.cc @@ -7,6 +7,8 @@ #include <SystemConfiguration/SCDynamicStoreKey.h> #include <SystemConfiguration/SCSchemaDefinitions.h> +#include "base/mac/scoped_cftyperef.h" + namespace net { NetworkChangeNotifierMac::NetworkChangeNotifierMac() @@ -22,10 +24,11 @@ bool NetworkChangeNotifierMac::IsCurrentlyOffline() const { void NetworkChangeNotifierMac::SetDynamicStoreNotificationKeys( SCDynamicStoreRef store) { // Called on notifier thread. - scoped_cftyperef<CFMutableArrayRef> notification_keys( + base::mac::ScopedCFTypeRef<CFMutableArrayRef> notification_keys( CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks)); - scoped_cftyperef<CFStringRef> key(SCDynamicStoreKeyCreateNetworkGlobalEntity( - NULL, kSCDynamicStoreDomainState, kSCEntNetInterface)); + base::mac::ScopedCFTypeRef<CFStringRef> key( + SCDynamicStoreKeyCreateNetworkGlobalEntity( + NULL, kSCDynamicStoreDomainState, kSCEntNetInterface)); CFArrayAppendValue(notification_keys.get(), key.get()); key.reset(SCDynamicStoreKeyCreateNetworkGlobalEntity( NULL, kSCDynamicStoreDomainState, kSCEntNetIPv4)); diff --git a/net/base/network_config_watcher_mac.cc b/net/base/network_config_watcher_mac.cc index 8e60223..365859e 100644 --- a/net/base/network_config_watcher_mac.cc +++ b/net/base/network_config_watcher_mac.cc @@ -9,6 +9,7 @@ #include <algorithm> #include "base/thread.h" +#include "base/mac/scoped_cftyperef.h" // We only post tasks to a child thread we own, so we don't need refcounting. DISABLE_RUNNABLE_METHOD_REFCOUNT(net::NetworkConfigWatcherMac); @@ -76,7 +77,7 @@ void NetworkConfigWatcherMac::Init() { NULL, // This is not reference counted. No release function. NULL, // No description for this. }; - scoped_cftyperef<SCDynamicStoreRef> store(SCDynamicStoreCreate( + base::mac::ScopedCFTypeRef<SCDynamicStoreRef> store(SCDynamicStoreCreate( NULL, CFSTR("org.chromium"), DynamicStoreCallback, &context)); run_loop_source_.reset(SCDynamicStoreCreateRunLoopSource( NULL, store.get(), 0)); diff --git a/net/base/network_config_watcher_mac.h b/net/base/network_config_watcher_mac.h index 78f06a5..f9f9d36 100644 --- a/net/base/network_config_watcher_mac.h +++ b/net/base/network_config_watcher_mac.h @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/message_loop.h" -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "base/scoped_ptr.h" namespace base { @@ -55,7 +55,7 @@ class NetworkConfigWatcherMac : public MessageLoop::DestructionObserver { // was created on. scoped_ptr<base::Thread> notifier_thread_; - scoped_cftyperef<CFRunLoopSourceRef> run_loop_source_; + base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> run_loop_source_; Delegate* const delegate_; diff --git a/net/base/platform_mime_util_mac.cc b/net/base/platform_mime_util_mac.cc index ce8c336..9d27e5d 100644 --- a/net/base/platform_mime_util_mac.cc +++ b/net/base/platform_mime_util_mac.cc @@ -5,7 +5,7 @@ #include <CoreServices/CoreServices.h> #include <string> -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "base/sys_string_conversions.h" #include "net/base/platform_mime_util.h" @@ -16,16 +16,17 @@ bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension( std::string ext_nodot = ext; if (ext_nodot.length() >= 1 && ext_nodot[0] == L'.') ext_nodot.erase(ext_nodot.begin()); - scoped_cftyperef<CFStringRef> ext_ref(base::SysUTF8ToCFStringRef(ext_nodot)); + base::mac::ScopedCFTypeRef<CFStringRef> ext_ref( + base::SysUTF8ToCFStringRef(ext_nodot)); if (!ext_ref) return false; - scoped_cftyperef<CFStringRef> uti( + base::mac::ScopedCFTypeRef<CFStringRef> uti( UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, ext_ref, NULL)); if (!uti) return false; - scoped_cftyperef<CFStringRef> mime_ref( + base::mac::ScopedCFTypeRef<CFStringRef> mime_ref( UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)); if (!mime_ref) return false; @@ -36,16 +37,17 @@ bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension( bool PlatformMimeUtil::GetPreferredExtensionForMimeType( const std::string& mime_type, FilePath::StringType* ext) const { - scoped_cftyperef<CFStringRef> mime_ref(base::SysUTF8ToCFStringRef(mime_type)); + base::mac::ScopedCFTypeRef<CFStringRef> mime_ref( + base::SysUTF8ToCFStringRef(mime_type)); if (!mime_ref) return false; - scoped_cftyperef<CFStringRef> uti( + base::mac::ScopedCFTypeRef<CFStringRef> uti( UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, mime_ref, NULL)); if (!uti) return false; - scoped_cftyperef<CFStringRef> ext_ref( + base::mac::ScopedCFTypeRef<CFStringRef> ext_ref( UTTypeCopyPreferredTagWithClass(uti, kUTTagClassFilenameExtension)); if (!ext_ref) return false; diff --git a/net/base/ssl_config_service_mac.cc b/net/base/ssl_config_service_mac.cc index 82a3632..2ce1d5c 100644 --- a/net/base/ssl_config_service_mac.cc +++ b/net/base/ssl_config_service_mac.cc @@ -6,7 +6,7 @@ #include <CoreFoundation/CoreFoundation.h> -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" using base::TimeDelta; using base::TimeTicks; @@ -36,7 +36,7 @@ bool RevocationStyleIsEnabled(CFStringRef key) { kRevocationPreferencesIdentifier, kCFPreferencesCurrentUser, kCFPreferencesAnyHost); if (plist_ref) { - scoped_cftyperef<CFPropertyListRef> scoped_plist_ref(plist_ref); + base::mac::ScopedCFTypeRef<CFPropertyListRef> scoped_plist_ref(plist_ref); if (CFGetTypeID(plist_ref) == CFStringGetTypeID()) { CFStringRef style = reinterpret_cast<CFStringRef>(plist_ref); if (CFStringCompare(kNoneRevocationValue, style, diff --git a/net/base/x509_certificate_mac.cc b/net/base/x509_certificate_mac.cc index cd8a3ca..05fbe63 100644 --- a/net/base/x509_certificate_mac.cc +++ b/net/base/x509_certificate_mac.cc @@ -10,12 +10,13 @@ #include "base/logging.h" #include "base/pickle.h" -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "base/sys_string_conversions.h" #include "net/base/cert_status_flags.h" #include "net/base/cert_verify_result.h" #include "net/base/net_errors.h" +using base::mac::ScopedCFTypeRef; using base::Time; namespace net { @@ -46,7 +47,7 @@ class MacTrustedCertificates { OSStatus status = SecTrustCopyAnchorCertificates(&anchor_array); if (status) return NULL; - scoped_cftyperef<CFArrayRef> scoped_anchor_array(anchor_array); + ScopedCFTypeRef<CFArrayRef> scoped_anchor_array(anchor_array); CFMutableArrayRef merged_array = CFArrayCreateMutableCopy( kCFAllocatorDefault, 0, anchor_array); if (!merged_array) @@ -337,17 +338,17 @@ OSStatus CopyCertChain(SecCertificateRef cert_handle, OSStatus result = X509Certificate::CreateSSLClientPolicy(&ssl_policy); if (result) return result; - scoped_cftyperef<SecPolicyRef> scoped_ssl_policy(ssl_policy); + ScopedCFTypeRef<SecPolicyRef> scoped_ssl_policy(ssl_policy); // Create a SecTrustRef. - scoped_cftyperef<CFArrayRef> input_certs( + ScopedCFTypeRef<CFArrayRef> input_certs( CFArrayCreate(NULL, (const void**)&cert_handle, 1, &kCFTypeArrayCallBacks)); SecTrustRef trust_ref = NULL; result = SecTrustCreateWithCertificates(input_certs, ssl_policy, &trust_ref); if (result) return result; - scoped_cftyperef<SecTrustRef> trust(trust_ref); + ScopedCFTypeRef<SecTrustRef> trust(trust_ref); // Evaluate trust, which creates the cert chain. SecTrustResultType status; @@ -396,7 +397,7 @@ void AddCertificatesFromBytes(const char* data, size_t length, SecExternalFormat format, X509Certificate::OSCertHandles* output) { SecExternalFormat input_format = format; - scoped_cftyperef<CFDataRef> local_data(CFDataCreateWithBytesNoCopy( + ScopedCFTypeRef<CFDataRef> local_data(CFDataCreateWithBytesNoCopy( kCFAllocatorDefault, reinterpret_cast<const UInt8*>(data), length, kCFAllocatorNull)); @@ -409,7 +410,7 @@ void AddCertificatesFromBytes(const char* data, size_t length, return; } - scoped_cftyperef<CFArrayRef> scoped_items(items); + ScopedCFTypeRef<CFArrayRef> scoped_items(items); CFTypeID cert_type_id = SecCertificateGetTypeID(); for (CFIndex i = 0; i < CFArrayGetCount(items); ++i) { @@ -513,7 +514,7 @@ int X509Certificate::Verify(const std::string& hostname, int flags, &ssl_policy); if (status) return NetErrorFromOSStatus(status); - scoped_cftyperef<SecPolicyRef> scoped_ssl_policy(ssl_policy); + ScopedCFTypeRef<SecPolicyRef> scoped_ssl_policy(ssl_policy); // Create and configure a SecTrustRef, which takes our certificate(s) // and our SSL SecPolicyRef. SecTrustCreateWithCertificates() takes an @@ -524,7 +525,7 @@ int X509Certificate::Verify(const std::string& hostname, int flags, &kCFTypeArrayCallBacks); if (!cert_array) return ERR_OUT_OF_MEMORY; - scoped_cftyperef<CFArrayRef> scoped_cert_array(cert_array); + ScopedCFTypeRef<CFArrayRef> scoped_cert_array(cert_array); CFArrayAppendValue(cert_array, cert_handle_); for (size_t i = 0; i < intermediate_ca_certs_.size(); ++i) CFArrayAppendValue(cert_array, intermediate_ca_certs_[i]); @@ -539,13 +540,13 @@ int X509Certificate::Verify(const std::string& hostname, int flags, status = SecTrustCreateWithCertificates(cert_array, ssl_policy, &trust_ref); if (status) return NetErrorFromOSStatus(status); - scoped_cftyperef<SecTrustRef> scoped_trust_ref(trust_ref); + ScopedCFTypeRef<SecTrustRef> scoped_trust_ref(trust_ref); // Set the trusted anchor certificates for the SecTrustRef by merging the // system trust anchors and the test root certificate. CFArrayRef anchor_array = Singleton<MacTrustedCertificates>::get()->CopyTrustedCertificateArray(); - scoped_cftyperef<CFArrayRef> scoped_anchor_array(anchor_array); + ScopedCFTypeRef<CFArrayRef> scoped_anchor_array(anchor_array); if (anchor_array) { status = SecTrustSetAnchorCertificates(trust_ref, anchor_array); if (status) @@ -573,7 +574,7 @@ int X509Certificate::Verify(const std::string& hostname, int flags, sizeof(tp_action_data)); if (!action_data_ref) return ERR_OUT_OF_MEMORY; - scoped_cftyperef<CFDataRef> scoped_action_data_ref(action_data_ref); + ScopedCFTypeRef<CFDataRef> scoped_action_data_ref(action_data_ref); status = SecTrustSetParameters(trust_ref, CSSM_TP_ACTION_DEFAULT, action_data_ref); if (status) @@ -594,7 +595,7 @@ int X509Certificate::Verify(const std::string& hostname, int flags, &chain_info); if (status) return NetErrorFromOSStatus(status); - scoped_cftyperef<CFArrayRef> scoped_completed_chain(completed_chain); + ScopedCFTypeRef<CFArrayRef> scoped_completed_chain(completed_chain); // Evaluate the results OSStatus cssm_result; @@ -864,7 +865,7 @@ bool X509Certificate::IsIssuedBy( result = CopyCertChain(os_cert_handle(), &cert_chain); if (result != noErr) return false; - scoped_cftyperef<CFArrayRef> scoped_cert_chain(cert_chain); + ScopedCFTypeRef<CFArrayRef> scoped_cert_chain(cert_chain); // Check all the certs in the chain for a match. int n = CFArrayGetCount(cert_chain); @@ -902,10 +903,10 @@ bool X509Certificate::GetSSLClientCertificates ( const std::string& server_domain, const std::vector<CertPrincipal>& valid_issuers, std::vector<scoped_refptr<X509Certificate> >* certs) { - scoped_cftyperef<SecIdentityRef> preferred_identity; + ScopedCFTypeRef<SecIdentityRef> preferred_identity; if (!server_domain.empty()) { // See if there's an identity preference for this domain: - scoped_cftyperef<CFStringRef> domain_str( + ScopedCFTypeRef<CFStringRef> domain_str( base::SysUTF8ToCFStringRef("https://" + server_domain)); SecIdentityRef identity = NULL; if (SecIdentityCopyPreference(domain_str, @@ -918,19 +919,19 @@ bool X509Certificate::GetSSLClientCertificates ( // Now enumerate the identities in the available keychains. SecIdentitySearchRef search = nil; OSStatus err = SecIdentitySearchCreate(NULL, CSSM_KEYUSE_SIGN, &search); - scoped_cftyperef<SecIdentitySearchRef> scoped_search(search); + ScopedCFTypeRef<SecIdentitySearchRef> scoped_search(search); while (!err) { SecIdentityRef identity = NULL; err = SecIdentitySearchCopyNext(search, &identity); if (err) break; - scoped_cftyperef<SecIdentityRef> scoped_identity(identity); + ScopedCFTypeRef<SecIdentityRef> scoped_identity(identity); SecCertificateRef cert_handle; err = SecIdentityCopyCertificate(identity, &cert_handle); if (err != noErr) continue; - scoped_cftyperef<SecCertificateRef> scoped_cert_handle(cert_handle); + ScopedCFTypeRef<SecCertificateRef> scoped_cert_handle(cert_handle); scoped_refptr<X509Certificate> cert( CreateFromHandle(cert_handle, SOURCE_LONE_CERT_IMPORT, @@ -983,7 +984,7 @@ CFArrayRef X509Certificate::CreateClientCertificateChain() const { LOG(ERROR) << "SecIdentityCreateWithCertificate error " << result; return NULL; } - scoped_cftyperef<CFMutableArrayRef> chain( + ScopedCFTypeRef<CFMutableArrayRef> chain( CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks)); CFArrayAppendValue(chain, identity); diff --git a/net/proxy/proxy_config_service_mac.cc b/net/proxy/proxy_config_service_mac.cc index a197313..c6faa27 100644 --- a/net/proxy/proxy_config_service_mac.cc +++ b/net/proxy/proxy_config_service_mac.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/mac_util.h" -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "base/sys_string_conversions.h" #include "net/base/net_errors.h" #include "net/proxy/proxy_config.h" @@ -40,7 +40,7 @@ bool GetBoolFromDictionary(CFDictionaryRef dict, } void GetCurrentProxyConfig(ProxyConfig* config) { - scoped_cftyperef<CFDictionaryRef> config_dict( + base::mac::ScopedCFTypeRef<CFDictionaryRef> config_dict( SCDynamicStoreCopyProxies(NULL)); DCHECK(config_dict); diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc index 8e8ef20..442715d 100644 --- a/net/proxy/proxy_resolver_mac.cc +++ b/net/proxy/proxy_resolver_mac.cc @@ -8,7 +8,7 @@ #include "base/logging.h" #include "base/mac_util.h" -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" #include "net/base/net_errors.h" @@ -60,19 +60,19 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, CompletionCallback* /*callback*/, RequestHandle* /*request*/, const BoundNetLog& net_log) { - scoped_cftyperef<CFStringRef> query_ref( + base::mac::ScopedCFTypeRef<CFStringRef> query_ref( base::SysUTF8ToCFStringRef(query_url.spec())); - scoped_cftyperef<CFURLRef> query_url_ref( + base::mac::ScopedCFTypeRef<CFURLRef> query_url_ref( CFURLCreateWithString(kCFAllocatorDefault, query_ref.get(), NULL)); if (!query_url_ref.get()) return ERR_FAILED; - scoped_cftyperef<CFStringRef> pac_ref( + base::mac::ScopedCFTypeRef<CFStringRef> pac_ref( base::SysUTF8ToCFStringRef( script_data_->type() == ProxyResolverScriptData::TYPE_AUTO_DETECT ? std::string() : script_data_->url().spec())); - scoped_cftyperef<CFURLRef> pac_url_ref( + base::mac::ScopedCFTypeRef<CFURLRef> pac_url_ref( CFURLCreateWithString(kCFAllocatorDefault, pac_ref.get(), NULL)); @@ -95,7 +95,7 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, CFTypeRef result = NULL; CFStreamClientContext context = { 0, &result, NULL, NULL, NULL }; - scoped_cftyperef<CFRunLoopSourceRef> runloop_source( + base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> runloop_source( CFNetworkExecuteProxyAutoConfigurationURL(pac_url_ref.get(), query_url_ref.get(), ResultCallback, @@ -119,7 +119,7 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, return ERR_FAILED; } DCHECK(CFGetTypeID(result) == CFArrayGetTypeID()); - scoped_cftyperef<CFArrayRef> proxy_array_ref((CFArrayRef)result); + base::mac::ScopedCFTypeRef<CFArrayRef> proxy_array_ref((CFArrayRef)result); // This string will be an ordered list of <proxy-uri> entries, separated by // semi-colons. It is the format that ProxyInfo::UseNamedProxy() expects. diff --git a/net/socket/ssl_client_socket_mac.cc b/net/socket/ssl_client_socket_mac.cc index 9a60907..918b6b8 100644 --- a/net/socket/ssl_client_socket_mac.cc +++ b/net/socket/ssl_client_socket_mac.cc @@ -9,7 +9,7 @@ #include <sys/socket.h> #include <sys/types.h> -#include "base/scoped_cftyperef.h" +#include "base/mac/scoped_cftyperef.h" #include "base/singleton.h" #include "base/string_util.h" #include "net/base/address_list.h" @@ -413,7 +413,7 @@ X509Certificate* GetServerCert(SSLContextRef ssl_context) { // before the certificate message has arrived and been parsed). if (status != noErr || !certs) return NULL; - scoped_cftyperef<CFArrayRef> scoped_certs(certs); + base::mac::ScopedCFTypeRef<CFArrayRef> scoped_certs(certs); DCHECK_GT(CFArrayGetCount(certs), 0); @@ -1042,7 +1042,7 @@ int SSLClientSocketMac::SetClientCert() { if (!ssl_config_.send_client_cert || !ssl_config_.client_cert) return noErr; - scoped_cftyperef<CFArrayRef> cert_refs( + base::mac::ScopedCFTypeRef<CFArrayRef> cert_refs( ssl_config_.client_cert->CreateClientCertificateChain()); VLOG(1) << "SSLSetCertificate(" << CFArrayGetCount(cert_refs) << " certs)"; OSStatus result = SSLSetCertificate(ssl_context_, cert_refs); |