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

Side by Side Diff: net/proxy/proxy_config_service_ios.cc

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/cert/x509_util_ios.cc ('k') | net/proxy/proxy_config_service_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/proxy/proxy_config_service_ios.h" 5 #include "net/proxy/proxy_config_service_ios.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #include <CFNetwork/CFProxySupport.h> 8 #include <CFNetwork/CFProxySupport.h>
9 9
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 19 matching lines...) Expand all
30 return default_value; 30 return default_value;
31 31
32 int int_value; 32 int int_value;
33 if (CFNumberGetValue(number, kCFNumberIntType, &int_value)) 33 if (CFNumberGetValue(number, kCFNumberIntType, &int_value))
34 return int_value; 34 return int_value;
35 else 35 else
36 return default_value; 36 return default_value;
37 } 37 }
38 38
39 void GetCurrentProxyConfig(ProxyConfig* config) { 39 void GetCurrentProxyConfig(ProxyConfig* config) {
40 base::mac::ScopedCFTypeRef<CFDictionaryRef> config_dict( 40 base::ScopedCFTypeRef<CFDictionaryRef> config_dict(
41 CFNetworkCopySystemProxySettings()); 41 CFNetworkCopySystemProxySettings());
42 DCHECK(config_dict); 42 DCHECK(config_dict);
43 43
44 // Auto-detect is not supported. 44 // Auto-detect is not supported.
45 // The kCFNetworkProxiesProxyAutoDiscoveryEnable key is not available on iOS. 45 // The kCFNetworkProxiesProxyAutoDiscoveryEnable key is not available on iOS.
46 46
47 // PAC file 47 // PAC file
48 48
49 if (GetBoolFromDictionary(config_dict.get(), 49 if (GetBoolFromDictionary(config_dict.get(),
50 kCFNetworkProxiesProxyAutoConfigEnable, 50 kCFNetworkProxiesProxyAutoConfigEnable,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 ProxyConfigServiceIOS::ProxyConfigServiceIOS() 101 ProxyConfigServiceIOS::ProxyConfigServiceIOS()
102 : PollingProxyConfigService(base::TimeDelta::FromSeconds(kPollIntervalSec), 102 : PollingProxyConfigService(base::TimeDelta::FromSeconds(kPollIntervalSec),
103 GetCurrentProxyConfig) { 103 GetCurrentProxyConfig) {
104 } 104 }
105 105
106 ProxyConfigServiceIOS::~ProxyConfigServiceIOS() { 106 ProxyConfigServiceIOS::~ProxyConfigServiceIOS() {
107 } 107 }
108 108
109 } // namespace net 109 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_util_ios.cc ('k') | net/proxy/proxy_config_service_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698