diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/base/keygen_handler_mac.cc | 6 | ||||
-rw-r--r-- | net/base/network_change_notifier_mac.cc | 4 | ||||
-rw-r--r-- | net/base/network_change_notifier_mac.h | 4 | ||||
-rw-r--r-- | net/base/network_config_watcher_mac.cc | 4 | ||||
-rw-r--r-- | net/base/platform_mime_util_mac.mm | 20 | ||||
-rw-r--r-- | net/cert/cert_verify_proc_mac.cc | 2 | ||||
-rw-r--r-- | net/cert/test_root_certs.h | 2 | ||||
-rw-r--r-- | net/cert/test_root_certs_mac.cc | 4 | ||||
-rw-r--r-- | net/cert/x509_certificate_ios.cc | 2 | ||||
-rw-r--r-- | net/cert/x509_certificate_mac.cc | 2 | ||||
-rw-r--r-- | net/cert/x509_util_ios.cc | 2 | ||||
-rw-r--r-- | net/proxy/proxy_config_service_ios.cc | 2 | ||||
-rw-r--r-- | net/proxy/proxy_config_service_mac.cc | 2 | ||||
-rw-r--r-- | net/proxy/proxy_resolver_mac.cc | 32 | ||||
-rw-r--r-- | net/ssl/client_cert_store_impl_mac.cc | 2 |
15 files changed, 40 insertions, 50 deletions
diff --git a/net/base/keygen_handler_mac.cc b/net/base/keygen_handler_mac.cc index eb31703..63ea847 100644 --- a/net/base/keygen_handler_mac.cc +++ b/net/base/keygen_handler_mac.cc @@ -113,7 +113,7 @@ std::string KeygenHandler::GenKeyAndSignChallenge() { if (url_.has_host()) { // TODO(davidben): Use something like "Key generated for // example.com", but localize it. - base::mac::ScopedCFTypeRef<CFStringRef> label( + base::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 @@ -139,7 +139,7 @@ std::string KeygenHandler::GenKeyAndSignChallenge() { crypto::LogCSSMError("SecKeychainItemExpor", err); goto failure; } - base::mac::ScopedCFTypeRef<CFDataRef> scoped_key_data(key_data); + base::ScopedCFTypeRef<CFDataRef> scoped_key_data(key_data); // Create an ASN.1 encoder. err = SecAsn1CoderCreate(&coder); @@ -234,7 +234,7 @@ static OSStatus CreateRSAKeyPair(int size_in_bits, crypto::LogCSSMError("SecKeychainCopyDefault", err); return err; } - base::mac::ScopedCFTypeRef<SecKeychainRef> scoped_keychain(keychain); + base::ScopedCFTypeRef<SecKeychainRef> scoped_keychain(keychain); { base::AutoLock locked(crypto::GetMacSecurityServicesLock()); err = SecKeyCreatePair( diff --git a/net/base/network_change_notifier_mac.cc b/net/base/network_change_notifier_mac.cc index 4fe0641..d75f0f8 100644 --- a/net/base/network_change_notifier_mac.cc +++ b/net/base/network_change_notifier_mac.cc @@ -196,9 +196,9 @@ void NetworkChangeNotifierMac::SetDynamicStoreNotificationKeys( // SCDynamicStore API does not exist on iOS. NOTREACHED(); #else - base::mac::ScopedCFTypeRef<CFMutableArrayRef> notification_keys( + base::ScopedCFTypeRef<CFMutableArrayRef> notification_keys( CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks)); - base::mac::ScopedCFTypeRef<CFStringRef> key( + base::ScopedCFTypeRef<CFStringRef> key( SCDynamicStoreKeyCreateNetworkGlobalEntity( NULL, kSCDynamicStoreDomainState, kSCEntNetInterface)); CFArrayAppendValue(notification_keys.get(), key.get()); diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h index ad9429a..168ea14 100644 --- a/net/base/network_change_notifier_mac.h +++ b/net/base/network_change_notifier_mac.h @@ -67,8 +67,8 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier { bool connection_type_initialized_; mutable base::Lock connection_type_lock_; mutable base::ConditionVariable initial_connection_type_cv_; - base::mac::ScopedCFTypeRef<SCNetworkReachabilityRef> reachability_; - base::mac::ScopedCFTypeRef<CFRunLoopRef> run_loop_; + base::ScopedCFTypeRef<SCNetworkReachabilityRef> reachability_; + base::ScopedCFTypeRef<CFRunLoopRef> run_loop_; Forwarder forwarder_; scoped_ptr<const NetworkConfigWatcherMac> config_watcher_; diff --git a/net/base/network_config_watcher_mac.cc b/net/base/network_config_watcher_mac.cc index 6d044ac..4e0fa29 100644 --- a/net/base/network_config_watcher_mac.cc +++ b/net/base/network_config_watcher_mac.cc @@ -43,7 +43,7 @@ class NetworkConfigWatcherMacThread : public base::Thread { // on, so we invoke this function later on in startup to keep it fast. void InitNotifications(); - base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> run_loop_source_; + base::ScopedCFTypeRef<CFRunLoopSourceRef> run_loop_source_; NetworkConfigWatcherMac::Delegate* const delegate_; base::WeakPtrFactory<NetworkConfigWatcherMacThread> weak_factory_; @@ -101,7 +101,7 @@ void NetworkConfigWatcherMacThread::InitNotifications() { NULL, // This is not reference counted. No release function. NULL, // No description for this. }; - base::mac::ScopedCFTypeRef<SCDynamicStoreRef> store(SCDynamicStoreCreate( + base::ScopedCFTypeRef<SCDynamicStoreRef> store(SCDynamicStoreCreate( NULL, CFSTR("org.chromium"), DynamicStoreCallback, &context)); run_loop_source_.reset(SCDynamicStoreCreateRunLoopSource( NULL, store.get(), 0)); diff --git a/net/base/platform_mime_util_mac.mm b/net/base/platform_mime_util_mac.mm index 99315db..1b61200 100644 --- a/net/base/platform_mime_util_mac.mm +++ b/net/base/platform_mime_util_mac.mm @@ -36,17 +36,15 @@ bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension( std::string ext_nodot = ext; if (ext_nodot.length() >= 1 && ext_nodot[0] == L'.') ext_nodot.erase(ext_nodot.begin()); - base::mac::ScopedCFTypeRef<CFStringRef> ext_ref( + base::ScopedCFTypeRef<CFStringRef> ext_ref( base::SysUTF8ToCFStringRef(ext_nodot)); if (!ext_ref) return false; - base::mac::ScopedCFTypeRef<CFStringRef> uti( - UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, - ext_ref, - NULL)); + base::ScopedCFTypeRef<CFStringRef> uti(UTTypeCreatePreferredIdentifierForTag( + kUTTagClassFilenameExtension, ext_ref, NULL)); if (!uti) return false; - base::mac::ScopedCFTypeRef<CFStringRef> mime_ref( + base::ScopedCFTypeRef<CFStringRef> mime_ref( UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType)); if (!mime_ref) return false; @@ -57,17 +55,15 @@ bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension( bool PlatformMimeUtil::GetPreferredExtensionForMimeType( const std::string& mime_type, base::FilePath::StringType* ext) const { - base::mac::ScopedCFTypeRef<CFStringRef> mime_ref( + base::ScopedCFTypeRef<CFStringRef> mime_ref( base::SysUTF8ToCFStringRef(mime_type)); if (!mime_ref) return false; - base::mac::ScopedCFTypeRef<CFStringRef> uti( - UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, - mime_ref, - NULL)); + base::ScopedCFTypeRef<CFStringRef> uti(UTTypeCreatePreferredIdentifierForTag( + kUTTagClassMIMEType, mime_ref, NULL)); if (!uti) return false; - base::mac::ScopedCFTypeRef<CFStringRef> ext_ref( + base::ScopedCFTypeRef<CFStringRef> ext_ref( UTTypeCopyPreferredTagWithClass(uti, kUTTagClassFilenameExtension)); if (!ext_ref) return false; diff --git a/net/cert/cert_verify_proc_mac.cc b/net/cert/cert_verify_proc_mac.cc index b474fad..5acda95 100644 --- a/net/cert/cert_verify_proc_mac.cc +++ b/net/cert/cert_verify_proc_mac.cc @@ -37,7 +37,7 @@ #define kSecEVOrganizationName CFSTR("Organization") #endif -using base::mac::ScopedCFTypeRef; +using base::ScopedCFTypeRef; namespace net { diff --git a/net/cert/test_root_certs.h b/net/cert/test_root_certs.h index 8257717..22c635f 100644 --- a/net/cert/test_root_certs.h +++ b/net/cert/test_root_certs.h @@ -96,7 +96,7 @@ class NET_EXPORT_PRIVATE TestRootCerts { #elif defined(OS_WIN) HCERTSTORE temporary_roots_; #elif defined(OS_MACOSX) - base::mac::ScopedCFTypeRef<CFMutableArrayRef> temporary_roots_; + base::ScopedCFTypeRef<CFMutableArrayRef> temporary_roots_; bool allow_system_trust_; #endif diff --git a/net/cert/test_root_certs_mac.cc b/net/cert/test_root_certs_mac.cc index 50c4b80..87824d4c 100644 --- a/net/cert/test_root_certs_mac.cc +++ b/net/cert/test_root_certs_mac.cc @@ -94,8 +94,8 @@ OSStatus TestRootCerts::FixupSecTrustRef(SecTrustRef trust_ref) const { if (status) return status; - base::mac::ScopedCFTypeRef<CFArrayRef> scoped_system_roots(system_roots); - base::mac::ScopedCFTypeRef<CFMutableArrayRef> scoped_roots( + base::ScopedCFTypeRef<CFArrayRef> scoped_system_roots(system_roots); + base::ScopedCFTypeRef<CFMutableArrayRef> scoped_roots( CFArrayCreateMutableCopy(kCFAllocatorDefault, 0, scoped_system_roots)); CFArrayAppendArray(scoped_roots, temporary_roots_, CFRangeMake(0, CFArrayGetCount(temporary_roots_))); diff --git a/net/cert/x509_certificate_ios.cc b/net/cert/x509_certificate_ios.cc index aac4520..32a4883 100644 --- a/net/cert/x509_certificate_ios.cc +++ b/net/cert/x509_certificate_ios.cc @@ -36,7 +36,7 @@ #include "net/cert/x509_util_ios.h" #include "net/cert/x509_util_nss.h" -using base::mac::ScopedCFTypeRef; +using base::ScopedCFTypeRef; namespace net { namespace { diff --git a/net/cert/x509_certificate_mac.cc b/net/cert/x509_certificate_mac.cc index 6c3df6f..fd9aaca 100644 --- a/net/cert/x509_certificate_mac.cc +++ b/net/cert/x509_certificate_mac.cc @@ -28,7 +28,7 @@ #include "crypto/rsa_private_key.h" #include "net/cert/x509_util_mac.h" -using base::mac::ScopedCFTypeRef; +using base::ScopedCFTypeRef; using base::Time; namespace net { diff --git a/net/cert/x509_util_ios.cc b/net/cert/x509_util_ios.cc index 5de6d19..736c26e 100644 --- a/net/cert/x509_util_ios.cc +++ b/net/cert/x509_util_ios.cc @@ -14,7 +14,7 @@ #include "net/cert/x509_certificate.h" #include "net/cert/x509_util_nss.h" -using base::mac::ScopedCFTypeRef; +using base::ScopedCFTypeRef; namespace net { namespace x509_util_ios { diff --git a/net/proxy/proxy_config_service_ios.cc b/net/proxy/proxy_config_service_ios.cc index 7b91c4f..4d359a6 100644 --- a/net/proxy/proxy_config_service_ios.cc +++ b/net/proxy/proxy_config_service_ios.cc @@ -37,7 +37,7 @@ bool GetBoolFromDictionary(CFDictionaryRef dict, } void GetCurrentProxyConfig(ProxyConfig* config) { - base::mac::ScopedCFTypeRef<CFDictionaryRef> config_dict( + base::ScopedCFTypeRef<CFDictionaryRef> config_dict( CFNetworkCopySystemProxySettings()); DCHECK(config_dict); diff --git a/net/proxy/proxy_config_service_mac.cc b/net/proxy/proxy_config_service_mac.cc index 7b5e797..54d0054 100644 --- a/net/proxy/proxy_config_service_mac.cc +++ b/net/proxy/proxy_config_service_mac.cc @@ -42,7 +42,7 @@ bool GetBoolFromDictionary(CFDictionaryRef dict, } void GetCurrentProxyConfig(ProxyConfig* config) { - base::mac::ScopedCFTypeRef<CFDictionaryRef> config_dict( + base::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 bf7b5c5..8ddf81f 100644 --- a/net/proxy/proxy_resolver_mac.cc +++ b/net/proxy/proxy_resolver_mac.cc @@ -77,22 +77,18 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, const CompletionCallback& /*callback*/, RequestHandle* /*request*/, const BoundNetLog& net_log) { - base::mac::ScopedCFTypeRef<CFStringRef> query_ref( + base::ScopedCFTypeRef<CFStringRef> query_ref( base::SysUTF8ToCFStringRef(query_url.spec())); - base::mac::ScopedCFTypeRef<CFURLRef> query_url_ref( - CFURLCreateWithString(kCFAllocatorDefault, - query_ref.get(), - NULL)); + base::ScopedCFTypeRef<CFURLRef> query_url_ref( + CFURLCreateWithString(kCFAllocatorDefault, query_ref.get(), NULL)); if (!query_url_ref.get()) return ERR_FAILED; - base::mac::ScopedCFTypeRef<CFStringRef> pac_ref( - base::SysUTF8ToCFStringRef( - script_data_->type() == ProxyResolverScriptData::TYPE_AUTO_DETECT ? - std::string() : script_data_->url().spec())); - base::mac::ScopedCFTypeRef<CFURLRef> pac_url_ref( - CFURLCreateWithString(kCFAllocatorDefault, - pac_ref.get(), - NULL)); + base::ScopedCFTypeRef<CFStringRef> pac_ref(base::SysUTF8ToCFStringRef( + script_data_->type() == ProxyResolverScriptData::TYPE_AUTO_DETECT + ? std::string() + : script_data_->url().spec())); + base::ScopedCFTypeRef<CFURLRef> pac_url_ref( + CFURLCreateWithString(kCFAllocatorDefault, pac_ref.get(), NULL)); if (!pac_url_ref.get()) return ERR_FAILED; @@ -112,11 +108,9 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, CFTypeRef result = NULL; CFStreamClientContext context = { 0, &result, NULL, NULL, NULL }; - base::mac::ScopedCFTypeRef<CFRunLoopSourceRef> runloop_source( - CFNetworkExecuteProxyAutoConfigurationURL(pac_url_ref.get(), - query_url_ref.get(), - ResultCallback, - &context)); + base::ScopedCFTypeRef<CFRunLoopSourceRef> runloop_source( + CFNetworkExecuteProxyAutoConfigurationURL( + pac_url_ref.get(), query_url_ref.get(), ResultCallback, &context)); if (!runloop_source) return ERR_FAILED; @@ -135,7 +129,7 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url, CFRelease(result); return ERR_FAILED; } - base::mac::ScopedCFTypeRef<CFArrayRef> proxy_array_ref( + base::ScopedCFTypeRef<CFArrayRef> proxy_array_ref( base::mac::CFCastStrict<CFArrayRef>(result)); DCHECK(proxy_array_ref != NULL); diff --git a/net/ssl/client_cert_store_impl_mac.cc b/net/ssl/client_cert_store_impl_mac.cc index 5fa42de..3345735 100644 --- a/net/ssl/client_cert_store_impl_mac.cc +++ b/net/ssl/client_cert_store_impl_mac.cc @@ -23,7 +23,7 @@ #include "net/cert/x509_util.h" #include "net/cert/x509_util_mac.h" -using base::mac::ScopedCFTypeRef; +using base::ScopedCFTypeRef; namespace net { |